[freeside-commits] freeside/FS/FS cust_main.pm, 1.271.2.75, 1.271.2.76

Ivan,,, ivan at wavetail.420.am
Fri Nov 6 15:39:49 PST 2009


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv25594

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	cust_main.pm 
Log Message:
backport using business-onlinepayment-description in all cases to 1.7

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.271.2.75
retrieving revision 1.271.2.76
diff -u -d -r1.271.2.75 -r1.271.2.76
--- cust_main.pm	27 Oct 2009 18:11:54 -0000	1.271.2.75
+++ cust_main.pm	6 Nov 2009 23:39:46 -0000	1.271.2.76
@@ -2672,7 +2672,8 @@
 if set, will override the value from the customer record.
 
 I<description> is a free-text field passed to the gateway.  It defaults to
-"Internet services".
+the value defined by the business-onlinepayment-description configuration
+option, or "Internet services" if that is unset.
 
 If an I<invnum> is specified, this payment (if successful) is applied to the
 specified invoice.  If you don't specify an I<invnum> you might want to
@@ -2711,7 +2712,17 @@
     warn "  $_ => $options{$_}\n" foreach keys %options;
   }
 
-  $options{'description'} ||= 'Internet services';
+  unless ( $options{'description'} ) {
+    if ( $conf->exists('business-onlinepayment-description') ) {
+      my $dtempl = $conf->config('business-onlinepayment-description');
+
+      my $agent = $self->agent->agent;
+      #$pkgs... not here
+      $options{'description'} = eval qq("$dtempl");
+    } else {
+      $options{'description'} = 'Internet services';
+    }
+  }
 
   eval "use Business::OnlinePayment";  
   die $@ if $@;
@@ -3657,7 +3668,8 @@
 if set, will override the value from the customer record.
 
 I<description> is a free-text field passed to the gateway.  It defaults to
-"Internet services".
+the value defined by the business-onlinepayment-description configuration
+option, or "Internet services" if that is unset.
 
 If an I<invnum> is specified, this payment (if successful) is applied to the
 specified invoice.  If you don't specify an I<invnum> you might want to



More information about the freeside-commits mailing list