Freeside:1.7: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.

This class handles the following functions for payinfo...

Payment Mask (Generation and Storage) Data Validation (parent checks need to be sure to call this) Pretty printing

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), '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), or 'MCRD' (Manual credit card) '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) or prepayment identifier (see FS::prepay_credit)
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.
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 - see FS::prepay_credit and sets billing type to BILL)
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), '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), or 'MCRD' (Manual credit card) 'COMP' (free) is depricated as a payment type in cust_pay
payby_payinfo_pretty
Returns payment method and information (suitably masked, if applicable) as a human-readable string, such as:

 Card #54xxxxxxxxxxxx32

or

 Check #119006

BUGS

Future items? Encryption - In the Future (Pull from Record.pm) Bad Card Stuff - In the Future (Integrate Banned Pay) Currency - In the Future

SEE ALSO

FS::payby, FS::Record