diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-02-15 21:44:40 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-02-15 21:44:40 -0800 |
commit | 799da5a4ff161203bbac930b75f3b934ccd19243 (patch) | |
tree | 5f1a4f0d6cad77e08336a6c2653a87fe87a7c77c /httemplate/elements/cust_payby.html | |
parent | af73ad83d772e140491f65306f53e11dc0b1b4ef (diff) |
multiple payment options (echeck fixes), RT#23741
Diffstat (limited to 'httemplate/elements/cust_payby.html')
-rw-r--r-- | httemplate/elements/cust_payby.html | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/httemplate/elements/cust_payby.html b/httemplate/elements/cust_payby.html index 20ad34311..0eb3e3ebe 100644 --- a/httemplate/elements/cust_payby.html +++ b/httemplate/elements/cust_payby.html @@ -107,15 +107,17 @@ </SELECT> <BR><FONT SIZE="-1"><% mt('Account type') |h %></FONT> </TD> - -% my( $account, $aba ) = split('@', -% ( $cgi->param($name.'_payby') || $cust_payby->payby ) =~ /^(CHEK|DCHK)$/ -% ? $cgi->param($name.'_payinfo') -% : $cust_payby->payinfo -% ); -% my $branch = ''; -% ($branch,$aba) = split('\.',$aba) -% if $echeck_country eq 'CA'; + +% my ( $account, $aba, $branch ) = ( '', '', '' ); +% if ( $cgi->param($name.'_payby') =~ /^(CHEK|DCHK)$/ ) { +% $account = $cgi->param($name.'_payinfo1'); +% $aba = $cgi->param($name.'_payinfo2'); +% $branch = $cgi->param($name.'_payinfo3'); +% } elsif ( $cust_payby->payby =~ /^(CHEK|DCHK)$/ ) { +% ( $account, $aba ) = split('@', $cust_payby->payinfo); +% ( $branch, $aba ) = split('\.',$aba) +% if $echeck_country eq 'CA'; +% } % % #false laziness w/view/cust_main/billing.html and misc/payment.cgi % my $routing_label = $echeck_country eq 'US' ? 'ABA/Routing #' @@ -287,7 +289,7 @@ if ( $curr_value ) { } else { $cust_payby = new FS::cust_payby {}; } -my $sel_payby = $cust_payby->payby; +my $sel_payby = $cgi->param($name.'_payby') || $cust_payby->payby; $sel_payby = 'CARD' if $sel_payby eq 'DCRD' || $sel_payby eq ''; $sel_payby = 'CHEK' if $sel_payby eq 'DCHK'; |