Re: credit card validation stable?
| From: | Stefan Neufeind, PEAR | Date: | Thu, 21 Oct 2004 00:04:29 +0000 |
| Subject: | Re: credit card validation stable? | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34009@lists.php.net to get a copy of this message | ||
Ian Eure wrote:
On Tuesday 19 October 2004 11:27 am, joe@joestump.net wrote:Agreed that it's not "fully implemented" in Validate yet. But how should we proceed with the creditcard-checkroutines in Validate since you say there is one in Payment_Process (which I haven't yet had a look into)? Can Validate be enhanced a bit, without doubling too much code from Payment_Process? Or should we deprecate creditcard-checks in Validate? Regards, StefanIt works fine for me, but it doesn't check expiration dates. You might also want to check out PEAR's Payment_Process library. Specifically check out the Payment_Process_Type_CreditCard class for validating such things (or just use the entire setup to do online transactions).The issue here is that Validate only validates the card number. You can use it's date validation to check the date, though this is somewhat clunky in my experience. It wants 4-digit years, and creditcards only have 2-digit years, so you have to compensate for that somehow. There's a none-too-elegant solution in Payment_Process if you want to check it out.