diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2016-07-25 16:32:30 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-08-29 18:28:46 -0500 |
commit | c1822833ea22d3d32d2f67412b834d48bfdef7fb (patch) | |
tree | c848eab898c64d03f9ab91245b8edf9d5ce6d99b /FS | |
parent | b09f61d517dc01dd2eae04b3e03a5b9e5dab1a0f (diff) |
RT#42393: Verification cust_pay_pending handling in history & report
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_main/Billing_Realtime.pm | 1 | ||||
-rw-r--r-- | FS/FS/cust_pay_pending.pm | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index 0fc2cb7e0..7c1de9b69 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -1950,6 +1950,7 @@ sub realtime_verify_bop { if ( $reverse->is_success ) { $cust_pay_pending->status('done'); + $cust_pay_pending->statustext('reversed'); my $cpp_authorized_err = $cust_pay_pending->replace; return $cpp_authorized_err if $cpp_authorized_err; diff --git a/FS/FS/cust_pay_pending.pm b/FS/FS/cust_pay_pending.pm index dfb07b84d..3a8322e06 100644 --- a/FS/FS/cust_pay_pending.pm +++ b/FS/FS/cust_pay_pending.pm @@ -455,6 +455,26 @@ sub decline { $self->replace; } +=item reverse [ STATUSTEXT ] + +Sets the status of this pending payment to "done" (with statustext +"reversed (manual)" unless otherwise specified). + +Currently only used when resolving pending payments manually. + +=cut + +# almost complete false laziness with decline, +# but want to avoid confusion, in case any additional steps/defaults are ever added to either +sub reverse { + my $self = shift; + my $statustext = shift || "reversed (manual)"; + + $self->status('done'); + $self->statustext($statustext); + $self->replace; +} + # _upgrade_data # # Used by FS::Upgrade to migrate to a new database. |