Freeside:3:Documentation:Developer/FS/payinfo Mixin

From Freeside
Jump to: navigation, search

NAME

FS::payinfo_Mixin - Mixin class for records in tables that contain payinfo.

SYNOPSIS

package FS::some_table; use vars qw(@ISA); @ISA = qw( FS::payinfo_Mixin FS::Record );

DESCRIPTION

This is a mixin class for records that contain payinfo.

FIELDS

payby
The following payment types (payby) are supported:
For Customers (cust_main): 'CARD' (credit card - automatic), 'DCRD' (credit card - on-demand), 'CHEK' (electronic check - automatic), 'DCHK' (electronic check - on-demand), 'LECB' (Phone bill billing), 'BILL' (billing), 'COMP' (free), or 'PREPAY' (special billing type: applies a credit and sets billing type to BILL - see FS::prepay_credit)
For Refunds (cust_refund): 'CARD' (credit cards), 'CHEK' (electronic check/ACH), 'LECB' (Phone bill billing), 'BILL' (billing), 'CASH' (cash), 'WEST' (Western Union), 'MCRD' (Manual credit card), 'MCHK' (Manual electronic check), 'CBAK' Chargeback, or 'COMP' (free)
For Payments (cust_pay): 'CARD' (credit cards), 'CHEK' (electronic check/ACH), 'LECB' (phone bill billing), 'BILL' (billing), 'PREP' (prepaid card), 'CASH' (cash), 'WEST' (Western Union), 'MCRD' (Manual credit card), 'MCHK' (Manual electronic check), 'PPAL' (PayPal) 'COMP' (free) is depricated as a payment type in cust_pay
payinfo
Payment information (payinfo) can be one of the following types:
Card Number, P.O., comp issuer (4-8 lowercase alphanumerics; think username) prepayment identifier (see FS::prepay_credit), PayPal transaction ID
paycvv
Card Verification Value, "CVV2" (also known as CVC2 or CID), the 3 or 4 digit number on the back (or front, for American Express) of the credit card
paymask

METHODS

mask_payinfo [ PAYBY, PAYINFO ]
This method converts the payment info (credit card, bank account, etc.) into a masked string.
Optionally, an arbitrary payby and payinfo can be passed.
payinfo_check
Checks payby and payinfo.
payby_payinfo_pretty [ LOCALE ]
Returns payment method and information (suitably masked, if applicable) as a human-readable string, such as:

 Card #54xxxxxxxxxxxx32

or

 Check #119006

payinfo_used [ PAYINFO ]
Returns 1 if there's an existing payment using this payinfo. This can be used to set the 'recurring payment' flag required by some processors.

BUGS

SEE ALSO

FS::payby, FS::Record