Freeside:1.9:Documentation:Developer/FS/cust pay pending

From Freeside
Jump to: navigation, search

NAME

FS::cust_pay_pending - Object methods for cust_pay_pending records

SYNOPSIS

 use FS::cust_pay_pending;

 $record = new FS::cust_pay_pending \%hash;
 $record = new FS::cust_pay_pending { 'column' => 'value' };

 $error = $record->insert;

 $error = $new_record->replace($old_record);

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::cust_pay_pending object represents an pending payment. It reflects local state through the multiple stages of processing a real-time transaction with an external gateway. FS::cust_pay_pending inherits from FS::Record. The following fields are currently supported:

paypendingnum
Primary key
custnum
Customer (see FS::cust_main)
paid
Amount of this payment
_date
Specified as a UNIX timestamp; see "time" in perlfunc. Also see Time::Local and Date::Parse for conversion functions.
payby
Payment Type (See FS::payinfo_Mixin for valid payby values)
payinfo
Payment Information (See FS::payinfo_Mixin for data format)
paymask
Masked payinfo (See FS::payinfo_Mixin for how this works)
paydate
Expiration date
payunique
Unique identifer to prevent duplicate transactions.
status
Pending transaction status, one of the following:
new
Aquires basic lock on payunique
pending
Transaction is pending with the gateway
authorized
Only used for two-stage transactions that require a separate capture step
captured
Transaction completed with payment gateway (sucessfully), not yet recorded in the database
declined
Transaction completed with payment gateway (declined), not yet recorded in the database
done
Transaction recorded in database
statustext
Additional status information.
paynum -

METHODS

new HASHREF
Creates a new pending payment. To add the pending payment to the database, see "insert".
Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the hash method.
insert
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
delete
Delete this record from the database.
replace OLD_RECORD
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
check
Checks all fields to make sure this is a valid pending payment. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.

BUGS

SEE ALSO

FS::Record, schema.html from the base documentation.