diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2016-05-03 23:17:37 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-05-04 00:18:44 -0500 |
commit | 57aed0231a284b2ce96e5fcc76a183f73b7e21ab (patch) | |
tree | 6b6c2b87acffe69532409c8a8ca31920f8cc6cf9 | |
parent | 21b9f3f3ff7870d7cd422b98125a9a917fe30979 (diff) |
RT#37632: Credit card validation [cust_pay_pending handling on error]
-rw-r--r-- | FS/FS/cust_main/Billing_Realtime.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index bbf86a55d..54c7c5d32 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -1965,6 +1965,17 @@ sub realtime_verify_bop { } + } else { # is not success + + # status is 'done' not 'declined', as in _realtime_bop_result + $cust_pay_pending->status('done'); + $cust_pay_pending->statustext( $transaction->error_message || 'Unknown error' ); + # could also record failure_status here, + # but it's not supported by B::OP::vSecureProcessing... + # need a B::OP module with (reverse) auth only to test it with + my $cpp_declined_err = $cust_pay_pending->replace; + return $cpp_declined_err if $cpp_declined_err; + } ### |