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

From Freeside
< Freeside:1.9:Documentation:Developer‎ | FS
Revision as of 18:15, 18 February 2008 by Ivan (talk | contribs) (import from POD)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 - new (acquires 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/declined (transaction completed with payment gateway, not yet recorded in the database), done (transaction recorded in database); statustext -; 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.