Difference between revisions of "Freeside:3:Documentation:Developer/FS/payinfo Mixin"
From Freeside
m (Edit via perl MediaWiki framework (1.13)) |
m (Edit via perl MediaWiki framework (1.13)) |
||
Line 16: | Line 16: | ||
: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 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), | + | :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), 'PPAL' (PayPal) 'COMP' (free) is depricated as a payment type in cust_pay |
; payinfo | ; payinfo | ||
:Payment information (payinfo) can be one of the following types: | :Payment information (payinfo) can be one of the following types: | ||
− | :Card Number, P.O., comp issuer (4-8 lowercase alphanumerics; think username) | + | :Card Number, P.O., comp issuer (4-8 lowercase alphanumerics; think username) prepayment identifier (see [[Freeside:3:Documentation:Developer/FS/prepay credit|FS::prepay_credit]]), PayPal transaction ID |
; paycvv | ; 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 | :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 | ||
Line 37: | Line 37: | ||
: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 | :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 | + | ; payby_payinfo_pretty [ LOCALE ] |
:Returns payment method and information (suitably masked, if applicable) as a human-readable string, such as: | :Returns payment method and information (suitably masked, if applicable) as a human-readable string, such as: | ||
<code> | <code> | ||
Line 47: | Line 47: | ||
Check #119006 | Check #119006 | ||
</code> | </code> | ||
+ | ; 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== | ==BUGS== | ||
==SEE ALSO== | ==SEE ALSO== | ||
[[Freeside:3:Documentation:Developer/FS/payby|FS::payby]], [[Freeside:3:Documentation:Developer/FS/Record|FS::Record]] | [[Freeside:3:Documentation:Developer/FS/payby|FS::payby]], [[Freeside:3:Documentation:Developer/FS/Record|FS::Record]] |
Revision as of 13:37, 27 June 2014
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), '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), '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.
- 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 [ 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.