Public Member Functions | |
isValidCard ($sNumber, $sType="", $sDate="") | |
Protected Member Functions | |
_isValidType ($sType, $sNumber) | |
_isExpired ($sDate) | |
_isValidNumer ($sNumber) | |
Protected Attributes | |
$_aCardsInfo |
Credit card validation class
Definition at line 7 of file oxccvalidator.php.
oxCcValidator._isExpired | ( | $ | sDate | ) | [protected] |
Checks credit card expiration date. Returns TRUE if card is not expired
string | $sDate credit card type |
Definition at line 52 of file oxccvalidator.php.
oxCcValidator._isValidNumer | ( | $ | sNumber | ) | [protected] |
checks credit card number. Returns TRUE if card number is valid
string | $sNumber credit card number |
Definition at line 77 of file oxccvalidator.php.
oxCcValidator._isValidType | ( | $ | sType, | |
$ | sNumber | |||
) | [protected] |
Checks credit card type. Returns TRUE if card is valid
string | $sType credit card type | |
string | $sNumber credit card number |
Definition at line 34 of file oxccvalidator.php.
oxCcValidator.isValidCard | ( | $ | sNumber, | |
$ | sType = "" , |
|||
$ | sDate = "" | |||
) |
Checks if provided credit card information is valid. Returns TRUE if valid
object | $sNumber credit card number | |
string | $sType credit card type [optional] | |
string | $sDate card expiration date [optional] |
Definition at line 111 of file oxccvalidator.php.
oxCcValidator.$_aCardsInfo [protected] |
array( "amx" => '/^3[47].{13}$/', "dlt" => '/^4.{15}$/', "dnc" => '/^30[0-5].{11}$|^3[68].{12}$/', "dsc" => '/^6011.{12}$/', "enr" => '/^2014.{11}$|^2149.{11}$/', "jcb" => '/^3.{15}$|^2131|1800.{11}$/', "mcd" => '/^5[1-5].{14}$/', "swi" => '/^[456].{15}$|^[456].{17,18}$/', "vis" => '/^4.{15}$|^4.{12}$/', )
Definition at line 14 of file oxccvalidator.php.