Re: Validate_CreditCard
| From: | Stefan Neufeind | Date: | Sun, 19 Oct 2003 08:09:39 +0000 |
| Subject: | Re: Validate_CreditCard | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22810@lists.php.net to get a copy of this message | ||
On 18 Oct 2003 at 21:15, Joe Stump wrote:
> 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
Fine! Joe, when you think you're "finished" with the class, please
let me know so I can add it to the Validate-package-part "Finance".
> 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.
I'm strongly in favor of making the "old" function a wrapper - and
also adjust "multiple" accordingly. When you say that the class
itself is finished I'll do the rest.
If you can it would be nice to get some testing-creditcard-numbers
(surely not correct ones) for integration in the test-scripts of
Validate.
Stefan