diff options
author | Ivan Kohler <ivan@freeside.biz> | 2019-07-26 11:14:05 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2019-07-26 11:14:05 -0700 |
commit | 07ed221540128b8c75f4cb5a2af1e01b25fa8e18 (patch) | |
tree | aeec9af09cc1b47752bdf4bc636ff1b64f41310c /httemplate/misc/process | |
parent | 14f234a943f1e4b5bbc6fe90254b8f5ca677f028 (diff) | |
parent | 2009d9cee8038aeff5b4313113fc23f546455cf5 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/misc/process')
-rw-r--r-- | httemplate/misc/process/payment.cgi | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index 56bcfd872..5b18367f7 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -186,15 +186,22 @@ if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) { %saveopt = map { $_ => scalar($cgi->param($_)) } @{$payby2fields{$payby}}; } - my $error = $cust_main->save_cust_payby( - 'saved_cust_payby' => \$cust_payby, - 'payment_payby' => $payby, - 'auto' => scalar($cgi->param('auto')), - 'weight' => scalar($cgi->param('weight')), - 'payinfo' => $payinfo, - 'payname' => $payname, - %saveopt - ); + my $error; + { + local $@; + eval { + $error = $cust_main->save_cust_payby( + 'saved_cust_payby' => \$cust_payby, + 'payment_payby' => $payby, + 'auto' => scalar($cgi->param('auto')), + 'weight' => scalar($cgi->param('weight')), + 'payinfo' => $payinfo, + 'payname' => $payname, + %saveopt + ); + }; + $error ||= $@; + } errorpage("error saving info, payment not processed: $error") if $error; |