summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-05-03 23:17:37 -0500
committerJonathan Prykop <jonathan@freeside.biz>2016-05-04 00:39:53 -0500
commitff9e2f92752c65f3bc3f1812111591bbd2cb355f (patch)
treede55ecdfc157f2ce421d4f7dc515f40fc6061b71
parent4137519a5a1a9380c59385536883e3e228627ee8 (diff)
RT#37632: Credit card validation [cust_pay_pending handling on error]
-rw-r--r--FS/FS/cust_main/Billing_Realtime.pm11
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 4c28d0e0e..6c0b655a2 100644
--- a/FS/FS/cust_main/Billing_Realtime.pm
+++ b/FS/FS/cust_main/Billing_Realtime.pm
@@ -1971,6 +1971,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;
+
}
###