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)) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
: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 [[Freeside:3:Documentation:Developer/FS/prepay credit|FS::prepay_credit]]) | :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 [[Freeside:3:Documentation:Developer/FS/prepay credit|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 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), | + | :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 | ; 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 31: | Line 31: | ||
; payinfo_check | ; payinfo_check | ||
:Checks payby and payinfo. | :Checks payby and payinfo. | ||
− | + | ; 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 41: | ||
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]] |
Latest revision as of 10:03, 10 April 2015
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.