Re: Validate_CreditCard
| From: | Joe Stump | Date: | Sun, 19 Oct 2003 02:13:32 +0000 |
| Subject: | Re: Validate_CreditCard | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22809@lists.php.net to get a copy of this message | ||
I added some basic CVV2 checking to the class. From the searching I did I
came up with the following:
CVV2 numbers are 4 digits for American Express and 3 digits for all
others. The first I've found to be true, but I'm wondering if the latter
is true. Any info would be welcome.
--Joe
>
> Well I've taken some of the CC validation that is currently in Validate
> and added functions for the following:
>
> - Expiry date validation
> - Type/Number validation (ie. Discover card number starts with '6011')
> - A catch all to test an entire number's characteristics
>
> Not done (not even sure it's possible to test this):
>
> - Cvv number validation (any info on this would be great)
> - Someone needs to test types Diners Club and JCB (I don't have those
> cards)
>
> You can check out the class at:
>
> http://professorx.jcssolutions.com/~jstump/CreditCard.phps
> http://professorx.jcssolutions.com/~jstump/cc_test.phps
>
> The second link is a link to a tester script I created if you want to test
> things yourself. We also have to figure out what to do with the current
> Validate::creditCard() function. There are two options as I see it.
>
> 1.) Make it a wrapper for Validate_CreditCard::number()
> 2.) Remove it entirely in favor of the new Validate_CreditCard::number()
>
> The first option offers backwards compatibility and will not break code
> using this function if someone were to upgrade their Validate package.
>
> Comments?
>
> --Joe
>
> --
> Joe Stump <joe@joestump.net>
> http://www.joestump.net
> "Label makers are proof God wants Sys Admins to be happy."
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Joe Stump <joe@joestump.net>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."