summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-08-15 16:59:05 -0700
committerMark Wells <mark@freeside.biz>2013-08-15 16:59:05 -0700
commit8f47076c27dd065fa130fd6b1af7dd90c2125d5f (patch)
treecafdc08b3e4208c00a30c6bb79680df5989ab682 /httemplate/view
parent7a51c5cf922048cf1478920b3fec496e0bb26aef (diff)
capture B:OP and B:BP failure_status values from payment attempts, #21117
Diffstat (limited to 'httemplate/view')
-rw-r--r--httemplate/view/cust_main/payment_history/attempted_batch_payment.html11
-rw-r--r--httemplate/view/cust_main/payment_history/attempted_payment.html12
2 files changed, 19 insertions, 4 deletions
diff --git a/httemplate/view/cust_main/payment_history/attempted_batch_payment.html b/httemplate/view/cust_main/payment_history/attempted_batch_payment.html
index 95947f512..765e54281 100644
--- a/httemplate/view/cust_main/payment_history/attempted_batch_payment.html
+++ b/httemplate/view/cust_main/payment_history/attempted_batch_payment.html
@@ -7,7 +7,14 @@ my ($payby,$payinfo) = translate_payinfo($cust_pay_batch);
$payby = translate_payby($payby,$payinfo);
my $info = $payby ? "($payby$payinfo)" : '';
-$info .= ': '. $cust_pay_batch->error_message
- if length($cust_pay_batch->error_message);
+my $detail = '';
+if ( $cust_pay_batch->failure_status ) {
+ $detail = $cust_pay_batch->display_status;
+ $detail .= ' ('.$cust_pay_batch->error_message.')'
+ if $cust_pay_batch->error_message;
+} else {
+ $detail = $cust_pay_batch->error_message;
+}
+$info .= ': '.$detail if length($detail);
</%init>
diff --git a/httemplate/view/cust_main/payment_history/attempted_payment.html b/httemplate/view/cust_main/payment_history/attempted_payment.html
index f044fc0d4..63209c7c7 100644
--- a/httemplate/view/cust_main/payment_history/attempted_payment.html
+++ b/httemplate/view/cust_main/payment_history/attempted_payment.html
@@ -12,7 +12,15 @@ if ( $opt{'pkg-balances'} && $cust_pay_pending->pkgnum ) {
$info .= ' for '. $cust_pkg->pkg_label_long;
}
-$info .= ': '. $cust_pay_pending->statustext
- if length($cust_pay_pending->statustext);
+my $detail = '';
+if ( $cust_pay_pending->failure_status ) {
+ $detail = $cust_pay_pending->display_status;
+ $detail .= ' (' . $cust_pay_pending->statustext . ')'
+ if $cust_pay_pending->statustext;
+} else {
+ $detail = $cust_pay_pending->statustext;
+}
+
+$info .= ': '.$detail if length($detail);
</%init>