Re: credit card validation stable?
| From: | Jeroen Houben | Date: | Wed, 20 Oct 2004 15:21:36 +0000 |
| Subject: | Re: credit card validation stable? | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34004@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:JeroenIt 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. The payment server ofcourse checks if everything is *really* valid. I however want to use the payment server as little as possible so I want to do a first check on the cc number on my server (where the form is hosted). That's more like a syntax check really. For the expiration dates I'll just use quickform's select element.