% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::cust_payby - Object methods for cust_payby records
use FS::cust_payby;
$record = new FS::cust_payby \%hash;
$record = new FS::cust_payby { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::cust_payby object represents customer stored payment information. FS::cust_payby inherits from FS::Record. The following fields are currently supported:
primary key
custnum
weight
payby
payinfo
paycvv
paymask
paydate
paystart_month
paystart_year
payissue
payname
paystate
paytype
payip
The credit card type (deduced from the card number).
Creates a new record. To add the record 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.
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
Delete this record from the database.
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
Checks all fields to make sure this is a valid record. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns a two element list consisting of the paydate month and year.
Returns a one line text label for this payment type.
Runs a "realtime_bop" in FS::cust_main::Billing_Realtime transaction on this card
Runs a "realtime_tokenize" in FS::cust_main::Billing_Realtime transaction on this card
Runs a realtime_verify_bop transaction on this card
Returns a list of valid values for the paytype field (bank account type for electronic check payment).
Returns the field names used in the web interface (including some pseudo-fields).
Subroutine (not a class or object method). Processes a hash reference of web interface contet (transfers the data from pseudo-fields to real fields).
If OLD object is passed, also preserves locationnum, paystart_month, paystart_year, payissue and payip. If the new field is blank but the old is not, the old field will be preserved.
Class method.
Returns a qsearch hash expression to search for parameters specified in HASHREF. Valid paramters are:
listref
Returns the number of unexpired cards configured for autobill
Returns the number of check accounts configured for autobill
Determine if the future_autobill report should be available. If so, return a dynamic title for it
Correct bad data injected into payment expire date column by Edge browser bug
The month and year values may have an extra character injected into form POST data by Edge browser. It was possible for some bad month values to slip past data validation.
If the stored value was out of range, it was causing payments screen to crash. We can detect and fix this by dropping the second digit.
If the stored value is is 11 or 12, it's possible the user inputted a 1. In this case, the payment method will fail to authorize, but the record will not cause crashdumps for being out of range.
In short, check for any expiration month > 12, and drop the extra digit
FS::Record, schema.html from the base documentation.
Hey! The above document had some coding errors, which are explained below:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'