projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ee27cd8
)
RT# 77193 - fixed error updating ACH payby thru selfservice, not saving changed accou...
author
Christopher Burger
<burgerc@freeside.biz>
Tue, 10 Oct 2017 14:04:07 +0000
(10:04 -0400)
committer
Christopher Burger
<burgerc@freeside.biz>
Tue, 10 Oct 2017 14:04:07 +0000
(10:04 -0400)
FS/FS/ClientAPI/MyAccount.pm
patch
|
blob
|
history
diff --git
a/FS/FS/ClientAPI/MyAccount.pm
b/FS/FS/ClientAPI/MyAccount.pm
index
e28aa18
..
ce887ef
100644
(file)
--- a/
FS/FS/ClientAPI/MyAccount.pm
+++ b/
FS/FS/ClientAPI/MyAccount.pm
@@
-1707,6
+1707,16
@@
sub update_payby {
my($context, $session, $custnum) = _custoragent_session_custnum($p);
return { 'error' => $session } if $context eq 'error';
my($context, $session, $custnum) = _custoragent_session_custnum($p);
return { 'error' => $session } if $context eq 'error';
+ if ($p->{'payby'} eq 'CHEK') {
+ $p->{'payinfo1'} =~ /^([\dx]+)$/
+ or return { 'error' => "illegal account number ". $p->{'payinfo1'} };
+ my $payinfo1 = $1;
+ $p->{'payinfo2'} =~ /^([\dx\.]+)$/ # . turned on by echeck-country CA ?
+ or return { 'error' => "illegal ABA/routing number ". $p->{'payinfo2'} };
+ my $payinfo2 = $1;
+ $p->{'payinfo'} = $payinfo1. '@'. $payinfo2;
+ }
+
my $cust_payby = qsearchs('cust_payby', {
'custnum' => $custnum,
'custpaybynum' => $p->{'custpaybynum'},
my $cust_payby = qsearchs('cust_payby', {
'custnum' => $custnum,
'custpaybynum' => $p->{'custpaybynum'},