diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-10-30 11:07:15 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-10-30 15:16:33 -0400 |
commit | 3872c1d3a2d975989e342be389b8260bfcc5ec41 (patch) | |
tree | edf47c2f1d497b128e5ab307b5b52bbf7a81e5ea /fs_selfservice/FS-SelfService | |
parent | db3651d40f67636c6fa0dc761e189ed1eb6113e1 (diff) |
RT# 79902 - fixed so change payment information link will still work when upgraded from V3 to V4 and restores functionality in V3
Conflicts:
FS/FS/ClientAPI/MyAccount.pm
fs_selfservice/FS-SelfService/cgi/selfservice.cgi
Diffstat (limited to 'fs_selfservice/FS-SelfService')
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/change_pay.html | 4 | ||||
-rwxr-xr-x | fs_selfservice/FS-SelfService/cgi/selfservice.cgi | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/fs_selfservice/FS-SelfService/cgi/change_pay.html b/fs_selfservice/FS-SelfService/cgi/change_pay.html index f90f6d92b..75ceee8f7 100644 --- a/fs_selfservice/FS-SelfService/cgi/change_pay.html +++ b/fs_selfservice/FS-SelfService/cgi/change_pay.html @@ -14,6 +14,7 @@ my $tail = qq(</TABLE>). qq(<INPUT TYPE="hidden" NAME="action" VALUE="process_change_pay">). + qq(<INPUT TYPE="hidden" NAME="custpaybynum" VALUE="$custpaybynum">). qq(<BR>). qq(<INPUT TYPE="submit" NAME="process" ). qq(VALUE="Save payment information"> ). @@ -60,9 +61,6 @@ delete $options{'DCRD'} unless $payby eq 'DCRD' || ! exists $options{'CARD'}; delete $options{'DCHK'} unless $payby eq 'DCHK' || ! exists $options{'CHEK'}; - ## set default layer to first payby. - @p = keys %options; $payby = $p[0]; - HTML::Widgets::SelectLayers->new( options => \%options, selected_layer => $payby, diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi index 831c0590a..dcfccdc5c 100755 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi @@ -306,8 +306,9 @@ sub process_change_ship { sub process_change_pay { my $postal = $cgi->param( 'postal_invoicing' ); my $payby = $cgi->param( 'payby' ); + $cgi->param('paydate', $cgi->param('year') . '-' . $cgi->param('month') . '-01'); my @list = - qw( payby payinfo payinfo1 payinfo2 month year payname + qw( payby payinfo payinfo1 payinfo2 month year paydate payname custpaybynum address1 address2 city county state zip country auto paytype paystate ss stateid stateid_state invoicing_list ); @@ -325,7 +326,11 @@ sub process_change_pay { }; } - _process_change_info( 'change_pay', @list ); + if (FS::SelfService->can('update_payby')) { + if ($cgi->param( 'custpaybynum' )) { _process_change_payby( 'change_pay', @list ); } + else { _process_insert_payby( 'change_pay', @list ); } + } + else { _process_change_info( 'change_pay', @list ); } } sub view_invoice { |