Re: credit card validation package proposal
| From: | Analysis & Solutions | Date: | Tue, 25 Mar 2003 17:37:29 +0000 |
| Subject: | Re: credit card validation package proposal | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-14616@lists.php.net to get a copy of this message | ||
Hi Pierre and Arnaud:
On Tue, Mar 25, 2003 at 10:14:55AM +0100, Pierre-Alain Joye wrote:
>
> We have already a CC validation method inside PEAR::Validate,
> http://pear.php.net/package-info.php?pacid=105
Ah, I see. Thanks. My routine does a lot more than just checking the
Luhn / Mod10 algorithm. Here's the description:
Checks that the length is correct, the first four digits
are within accepted ranges, the number passes the Mod 10
Checksum and that you accept the given type of card.
> It will be possible to merge your function and the existing ones, to
> allow specific cards check.
Hmmm... Not sure. I put the new source up at
http://www.analysisandsolutions.com/pear/ccvs.inc
This could be a drop in for the existing function, since the sole argument
of creditCard() is the first argument of my function and all other
arguments in my function are optional.
--Dan
--
PHP classes that make web design easier
SqlSolution.info | LayoutSolution.info | FormSolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409