[freeside-commits] freeside/FS/FS cust_main_county.pm, 1.16, 1.17 cust_main.pm, 1.191, 1.192

Ivan,,, ivan at wavetail.420.am
Wed Aug 24 06:22:29 PDT 2005


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv27204/FS/FS

Modified Files:
	cust_main_county.pm cust_main.pm 
Log Message:
customer edit: abstract out billing info to billing.html, re-do payment type selection with HTML::Widgets::SelectLayers, add Switch/Solo/Maestro support for start date & issue #.  customer view: re-order fields for consistency.  selfservice API: support paystart_month, paystart_year, payissue and payip in MyAccount::process_payment and ::edit_info and Signup::new_customer, FS::cust_main::realtime_bop: support paystart_month paystart_year payissue payip fields

Index: cust_main_county.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main_county.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- cust_main_county.pm	18 Mar 2005 09:15:36 -0000	1.16
+++ cust_main_county.pm	24 Aug 2005 13:22:27 -0000	1.17
@@ -251,7 +251,7 @@
   foreach my $state ( sort keys %{ $cust_main_county{$selected_country} } ) {
     my $text = $state || '(n/a)';
     my $selected = $state eq $selected_state ? 'SELECTED' : '';
-    $state_html .= "\n<OPTION $selected VALUE=$state>$text</OPTION>"
+    $state_html .= qq(\n<OPTION $selected VALUE="$state">$text</OPTION>);
   }
   $state_html .= '</SELECT>';
 
@@ -265,7 +265,7 @@
       keys %cust_main_county
   ) {
     my $selected = $country eq $selected_country ? ' SELECTED' : '';
-    $country_html .= "\n<OPTION$selected>$country</OPTION>"
+    $country_html .= qq(\n<OPTION$selected VALUE="$country">$country</OPTION>");
   }
   $country_html .= '</SELECT>';
 

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -d -r1.191 -r1.192
--- cust_main.pm	18 Aug 2005 07:58:22 -0000	1.191
+++ cust_main.pm	24 Aug 2005 13:22:27 -0000	1.192
@@ -17,7 +17,7 @@
 use Date::Format;
 #use Date::Manip;
 use String::Approx qw(amatch);
-use Business::CreditCard;
+use Business::CreditCard 0.28;
 use FS::UID qw( getotaker dbh );
 use FS::Record qw( qsearchs qsearch dbdef );
 use FS::Misc qw( send_email );
@@ -2195,13 +2195,33 @@
     $paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
     $content{expiration} = "$2/$1";
 
-    if ( defined $self->dbdef_table->column('paycvv') ) {
-      my $paycvv = exists($options{'paycvv'})
-                     ? $options{'paycvv'}
-                     : $self->paycvv;
-      $content{cvv2} = $self->paycvv
-        if length($paycvv);
-    }
+    my $paycvv = exists($options{'paycvv'})
+                   ? $options{'paycvv'}
+                   : $self->paycvv;
+    $content{cvv2} = $self->paycvv
+      if length($paycvv);
+
+    my $paystart_month = exists($options{'paystart_month'})
+                           ? $options{'paystart_month'}
+                           : $self->paystart_month;
+
+    my $paystart_year  = exists($options{'paystart_year'})
+                           ? $options{'paystart_year'}
+                           : $self->paystart_year;
+
+    $content{card_start} = "$paystart_month/$paystart_year"
+      if $paystart_month && $paystart_year;
+
+    my $payissue       = exists($options{'payissue'})
+                           ? $options{'payissue'}
+                           : $self->payissue;
+    $content{issue_number} = $payissue if $payissue;
+
+    my $payip          = exists($options{'payip'})
+                           ? $options{'payip'}
+                           : $self->payip;
+    $content{customer_ip} = $payip
+      if length($payip);
 
     $content{recurring_billing} = 'YES'
       if qsearch('cust_pay', { 'custnum' => $self->custnum,



More information about the freeside-commits mailing list