add omit_cust_main_county flag to payment_info API call, RT#75124
[freeside.git] / FS / FS / ClientAPI / MyAccount.pm
index 4a878f8..e69122b 100644 (file)
@@ -850,6 +850,8 @@ sub payment_info {
 
   my %return = %$payment_info;
 
+  delete $return{'cust_main_county'} if $p->{'omit_cust_main_county'};
+
   my $custnum = $session->{'custnum'};
 
   my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
@@ -1007,7 +1009,7 @@ sub validate_payment {
     }
 
     $payinfo =~ s/\D//g;
-    $payinfo =~ /^(\d{13,16}|\d{8,9})$/
+    $payinfo =~ /^(\d{13,19}|\d{8,9})$/
       or return { 'error' => gettext('invalid_card') }; # . ": ". $self->payinfo
     $payinfo = $1;
 
@@ -1187,7 +1189,7 @@ sub do_process_payment {
 
     #and generate an invoice for it now too
     $error = $cust_main->bill( 'pkg_list' => [ $cust_pkg ] );
-    return { 'error' => "payment processed and fee ordered sucessfully, but error billing fee: $error" }
+    return { 'error' => "payment processed and fee ordered successfully, but error billing fee: $error" }
       if $error;
 
   }