diff options
author | ivan <ivan> | 2011-08-06 00:50:48 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-08-06 00:50:48 +0000 |
commit | 4e764e5f9a7b690baf95906c4455311c2560120f (patch) | |
tree | 7f9b8c5bbc4bcec634184253230bdf7d8eccdde9 /httemplate/misc | |
parent | 0d2c8c61b8c5644c7dedcffcb28210f9a0cec55d (diff) |
echeck options to hide routing number and add account owner name, RT#13885
Diffstat (limited to 'httemplate/misc')
-rw-r--r-- | httemplate/misc/payment.cgi | 20 | ||||
-rw-r--r-- | httemplate/misc/process/payment.cgi | 9 |
2 files changed, 19 insertions, 10 deletions
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index a033c1cea..447cfa3c1 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -135,7 +135,7 @@ % $stateid, $stateid_state ) % = ( '', '', '', '', '', '', '', '' ); % if ( $cust_main->payby =~ /^(CHEK|DCHK)$/ ) { -% $cust_main->paymask =~ /^([\dx]+)\@([\dx]+)$/i +% $cust_main->paymask =~ /^([\dx]+)\@([\dx]*)$/i % or die "unparsable payinfo ". $cust_main->payinfo; % ($payinfo1, $payinfo2) = ($1, $2); % $payname = $cust_main->payname; @@ -154,13 +154,17 @@ <TD ALIGN="right"><% mt('Type') |h %></TD> <TD><SELECT NAME="paytype"><% join('', map { qq!<OPTION VALUE="$_" !.($paytype eq $_ ? 'SELECTED' : '').">$_</OPTION>" } @FS::cust_main::paytypes) %></SELECT></TD> </TR> - <TR> - <TD ALIGN="right"><% mt('ABA/Routing number') |h %></TD> - <TD> - <INPUT TYPE="text" SIZE=10 MAXLENGTH=9 NAME="payinfo2" VALUE="<%$payinfo2%>"> - (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/ach.html', 380, 240, 'ach_popup' ), CAPTION, 'ACH Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;"><% mt('help') |h %></A>) - </TD> - </TR> +% if ( $conf->exists('echeck-no_routing') ) { + <INPUT TYPE="text" NAME="payinfo2" VALUE="<%$payinfo2%>"> +% } else { + <TR> + <TD ALIGN="right"><% mt('ABA/Routing number') |h %></TD> + <TD> + <INPUT TYPE="text" SIZE=10 MAXLENGTH=9 NAME="payinfo2" VALUE="<%$payinfo2%>"> + (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/ach.html', 380, 240, 'ach_popup' ), CAPTION, 'ACH Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;"><% mt('help') |h %></A>) + </TD> + </TR> +% } <TR> <TD ALIGN="right"><% mt('Bank name') |h %></TD> <TD><INPUT TYPE="text" NAME="payname" VALUE="<%$payname%>"></TD> diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index 5fa57e448..fb6a41bd3 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -81,8 +81,13 @@ if ( $payby eq 'CHEK' ) { $cgi->param('payinfo1') =~ /^(\d+)$/ or errorpage("illegal account number ". $cgi->param('payinfo1')); my $payinfo1 = $1; - $cgi->param('payinfo2') =~ /^(\d+)$/ - or errorpage("illegal ABA/routing number ". $cgi->param('payinfo2')); + if ( $conf->exists('echeck-no_routing') ) { + $cgi->param('payinfo2') =~ /^(\d*)$/ + or errorpage("illegal ABA/routing number ". $cgi->param('payinfo2')); + } else { + $cgi->param('payinfo2') =~ /^(\d+)$/ + or errorpage("illegal ABA/routing number ". $cgi->param('payinfo2')); + } my $payinfo2 = $1; $payinfo = $payinfo1. '@'. $payinfo2; } |