RE: [PEAR-DEV] Mod 10 for Payment package?
| From: | Joe Stump | Date: | Tue, 16 Sep 2003 14:52:10 +0000 |
| Subject: | RE: [PEAR-DEV] Mod 10 for Payment package? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-21577@lists.php.net to get a copy of this message | ||
> Please note that there is also a check for Validate::creditCard().
> Maybe this is a bit to simplistic and could be further improved if
> you're about to implement a larger / better algorithm?
It appears that mod 10 is already included, however, the creditCard
function does not do the following:
1.) Check type specific validation (ie. Discover/Novus starts with 6011)
2.) Expiration checking (ie. $month > 1 && $month < 12) for month/year
The function also does not return a PEAR_Error class, which isn't huge,
but when processing CC cards it's good to pinpoint the exact error (ie.
Bad number or bad expiration?).
I do agree that the proposed changes be placed in the Validate package -
Possibly as Validate_CC?
--Joe
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php