use FS::payinfo_transaction_Mixin;
use FS::cust_main_Mixin;
use FS::cust_main;
+use FS::cust_pkg;
use FS::cust_pay;
@ISA = qw( FS::payinfo_transaction_Mixin FS::cust_main_Mixin FS::Record );
Unique identifer to prevent duplicate transactions.
+=item pkgnum
+
+Desired pkgnum when using experimental package balances.
+
=item status
Pending transaction status, one of the following:
Transaction is pending with the gateway
+=item thirdparty
+
+Customer has been sent to an off-site payment gateway to complete processing
+
=item authorized
Only used for two-stage transactions that require a separate capture step
Additional status information.
-=cut
+=item gatewaynum
-#=item cust_balance -
+L<FS::payment_gateway> id.
=item paynum -
#|| $self->ut_money('cust_balance')
|| $self->ut_hexn('session_id')
|| $self->ut_foreign_keyn('paynum', 'cust_pay', 'paynum' )
+ || $self->ut_foreign_keyn('pkgnum', 'cust_pkg', 'pkgnum')
|| $self->payinfo_check() #payby/payinfo/paymask/paydate
;
return $error if $error;
}
-=item decline
+=item decline [ STATUSTEXT ]
-Sets the status of this pending pament to "done" (with statustext
-"declined (manual)").
+Sets the status of this pending payment to "done" (with statustext
+"declined (manual)" unless otherwise specified).
Currently only used when resolving pending payments manually.
sub decline {
my $self = shift;
+ my $statustext = shift || "declined (manual)";
#could send decline email too? doesn't seem useful in manual resolution
$self->status('done');
- $self->statustext("declined (manual)");
+ $self->statustext($statustext);
$self->replace;
}