$payinfo = $cgi->param('payinfo');
$payinfo =~ s/\D//g;
- $payinfo =~ /^(\d{13,16}|\d{8,9})$/
+ $payinfo =~ /^(\d{13,19}|\d{8,9})$/
or errorpage(gettext('invalid_card'));
$payinfo = $1;
validate($payinfo)
or errorpage(gettext('invalid_card'));
- unless ( $payinfo =~ /^99\d{14}$/ ) { #token
+ unless ( $cust_main->tokenized($payinfo) ) { #token
my $cardtype = cardtype($payinfo);
errorpage("error saving info, payment not processed: $error")
if $error;
+
+ } elsif ( $payby eq 'CARD' ) { # not saving
+
+ $paymask = FS::payinfo_Mixin->mask_payinfo('CARD',$payinfo); # for untokenized but tokenizable payinfo
+
}
}
#and generate an invoice for it now too
$error = $cust_main->bill( 'pkg_list' => [ $cust_pkg ] );
- errorpage("payment processed and fee ordered sucessfully, but error billing fee: $error")
+ errorpage("payment processed and fee ordered successfully, but error billing fee: $error")
if $error;
}