X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fpayment.cgi;h=4d4e62a3274f9b2d91ed3216884ef184349e5c34;hb=959a59186f30a33d167b12e67d3c9cc4ce58a0f5;hp=5f945a71a7a8e9614a538b6496e3048e2a52df28;hpb=3b236eac5f7926f18623f6b9dc7c6f0d350ab61c;p=freeside.git diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index 5f945a71a..4d4e62a32 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -32,6 +32,8 @@ my $custnum = $1; my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); die "unknown custnum $custnum" unless $cust_main; +my $processing_fee = $cgi->param('processing_fee') ? $cgi->param('processing_fee') : ''; + $cgi->param('amount') =~ /^\s*(\d*(\.\d\d)?)\s*$/ or errorpage("illegal amount ". $cgi->param('amount')); my $amount = $1; @@ -124,7 +126,9 @@ if ( $payby eq 'CHEK' ) { if ( defined $cust_main->dbdef_table->column('paycvv') ) { if ( length($cgi->param('paycvv') ) ) { - if ( cardtype($payinfo) eq 'American Express card' ) { + if ( $cgi->param('paycvv') =~ /^\*+$/ ) { + $paycvv = $cust_main->paycvv; + } elsif ( cardtype($payinfo) eq 'American Express card' ) { $cgi->param('paycvv') =~ /^(\d{4})$/ or errorpage("CVV2 (CID) for American Express cards is four digits."); $paycvv = $1; @@ -202,6 +206,7 @@ if ( $cgi->param('batch') ) { 'payinfo' => $payinfo, 'paydate' => "$year-$month-01", 'payname' => $payname, + 'processing-fee' => $processing_fee, map { $_ => scalar($cgi->param($_)) } @{$payby2fields{$payby}} ); @@ -223,6 +228,7 @@ if ( $cgi->param('batch') ) { 'discount_term' => $discount_term, 'no_auto_apply' => ($cgi->param('apply') eq 'never') ? 'Y' : '', 'no_invnum' => 1, + 'processing-fee' => $processing_fee, map { $_ => scalar($cgi->param($_)) } @{$payby2fields{$payby}} ); errorpage($error) if $error;