Re: credit card validation stable?
| From: | Ian Eure | Date: | Thu, 21 Oct 2004 01:41:45 +0000 |
| Subject: | Re: credit card validation stable? | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34010@lists.php.net to get a copy of this message | ||
On Wednesday 20 October 2004 05:04 pm, Stefan Neufeind, PEAR wrote:
> Ian Eure wrote:
> > On Tuesday 19 October 2004 11:27 am, joe@joestump.net wrote:
> >>It 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.
>
> 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?
>
Absolutely not. I think that the checks should be moved into Validate, and
Payment_Process can call them there.
So far as I know, the only validation code in P_P is the credit card
expiration date validation. It calls Validate::creditCard for pre-transaction
verification of the card number.
I believe that Joe Stump submitted a patch to implement CC expdate validation
for Validate, but that it was rejected.
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]