Re: Credit card validation (Luhn check algorithm)
| From: | Tomas V.V.Cox | Date: | Wed, 22 May 2002 13:38:58 +0000 |
| Subject: | Re: Credit card validation (Luhn check algorithm) | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-6330@lists.php.net to get a copy of this message | ||
Dave Mertens wrote:
>
> On Wed, May 22, 2002 at 02:37:27PM +0200, Martin Jansen wrote:
> > On Wed, 22 May 2002 13:21:55 +0200 (CEST), Ondrej Jombik wrote:
> >
> > >For elementary credit card validation is Luhn check algorithm
> > >provided. I implemented this into PHP, because it wasn't already
> > >done. You can look at it here:
> > >
> > Well, it's not that easy to find a proper category/name for the
> > algorithm: For me both Payment_Luhn and Algorithm_Luhn sound
> > reasonable. Other opinions?
> >
>
> +1 for algorithm_Luhn, it's not a payment service/method, it's a validation
> routine.
>
> BTW Luhn checks aren't only used for creditcards. But it is the most common
> use for it..
>
Weren't some where a Validator class? IMHO that belongs to it. If there
isn't one, we should start to think on it :-)
Tomas V.V.Cox