X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fpayment.cgi;h=717d57c8588268e00aa1848abdb390621926df46;hb=11bbf29de447fe39e9d7155fe280a0df70fa8c3c;hp=74ca7348f88dd6c01cd502013931e749d7685ad8;hpb=c5a2d3613acdc3b9ab6f32eaf5316c2834071417;p=freeside.git diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index 74ca7348f..717d57c85 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -129,13 +129,13 @@ if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) { $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); @@ -193,6 +193,11 @@ if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) { 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 + } } @@ -251,7 +256,7 @@ if ( $cgi->param('batch') ) { #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; }