X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fpayment.cgi;h=506e26684eae5e30b8752335cfb8f4538e80b127;hp=e09cb570c53d76f942cd70674ed564ae4849cb75;hb=074464a707b2c8b83cc50cd0bb067660ef4d0f9f;hpb=c6fb9a26030c82d4c25618046230db463ff95950 diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index e09cb570c..506e26684 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -81,11 +81,16 @@ if ( $payby eq 'CHEK' ) { $payinfo = $cust_main->payinfo; } else { $cgi->param('payinfo1') =~ /^(\d+)$/ - or errorpage("illegal account number ". $cgi->param('payinfo1')); + or errorpage("Illegal account number ". $cgi->param('payinfo1')); my $payinfo1 = $1; $cgi->param('payinfo2') =~ /^(\d+)$/ - or errorpage("illegal ABA/routing number ". $cgi->param('payinfo2')); + or errorpage("Illegal ABA/routing number ". $cgi->param('payinfo2')); my $payinfo2 = $1; + if ( $conf->config('echeck-country') eq 'CA' ) { + $cgi->param('payinfo3') =~ /^(\d{5})$/ + or errorpage("Illegal branch number ". $cgi->param('payinfo2')); + $payinfo2 = "$1.$payinfo2"; + } $payinfo = $payinfo1. '@'. $payinfo2; } @@ -124,7 +129,7 @@ if ( $payby eq 'CHEK' ) { die "unknown payby $payby"; } -$cgi->param('discount_term') =~ /^\d*$/ +$cgi->param('discount_term') =~ /^(\d*)$/ or errorpage("illegal discount_term"); my $discount_term = $1;