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:48:23 -0500 |
commit | e5aee97b7d4c0cd8d6d0c3f0b1bca05adb676d7d (patch) | |
tree | fcbd627892b8bc5c13a9ac0e3b593523e25699b1 /FS | |
parent | cd4651d982b36a8ac8f9e57ef1b9c34734259cdc (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 8ebad53cb..7c194e102 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -1962,6 +1962,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 3a54e2d26..a775553c9 100644 --- a/FS/FS/cust_pay_pending.pm +++ b/FS/FS/cust_pay_pending.pm @@ -451,6 +451,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. |