Credit card numbers 
Author Message
 Credit card numbers

Quote:

> Does anyone know of an algorithym which will check for missing digits in
> credit card numbers
> -------------------------------------------------
> Brian Cohen, BCC Consultants

> -------------------------------------------------

It is a simple MOD10 Validation

George Slade



Sun, 19 Oct 1997 03:00:00 GMT
 Credit card numbers

Quote:

> Does anyone know of an algorithym which will check for missing digits in
> credit card numbers
> -------------------------------------------------
> Brian Cohen, BCC Consultants

> -------------------------------------------------

It is a simple MOD10 Validation

George Slade



Sun, 19 Oct 1997 03:00:00 GMT
 Credit card numbers

Quote:

>Does anyone know of an algorithym which will check for missing digits in
>credit card numbers
>-------------------------------------------------
>Brian Cohen, BCC Consultants

>-------------------------------------------------

You need to do three things to verify a credit card number before sending it to the
bank:
1) a MOD10 check on the card number
2) length checks on the card number (13 to 19 digits)
3) expiry date check


Mon, 20 Oct 1997 03:00:00 GMT
 Credit card numbers
can someone explain a mod10 validation.  May be simple, but I've
never heard of it.

--
Bill Rice



Wed, 12 Nov 1997 03:00:00 GMT
 Credit card numbers

Quote:

>can someone explain a mod10 validation.  May be simple, but I've
>never heard of it.
>--
>Bill Rice


You're right it is a very simple algorithm, unfortunately I cannot
remember it in detail. If you write to a credit card company, or a
card issuer, they will I'm sure send you the details you need.

Basically you add a 1 to every other digit in the card number add all
the numbers together and MOD by 10. If the result is non zero then the
card is invalid.

I make no guarantees that the above is fully accurate but is the basic
methodology.
---------------------------------------------------------------------------

| "Pay the man and damn his impudence!" - Prince George, BlackAdder.      |
---------------------------------------------------------------------------



Fri, 28 Nov 1997 03:00:00 GMT
 Credit card numbers

: >can someone explain a mod10 validation.  May be simple, but I've
: >never heard of it.

: >--
: >Bill Rice


Newsgroups: comp.lang.basic.visual.misc
Subject: Re: CORRECTION... credit card #'s  -  cc.txt [1/1]
Date: 25 May 1995 13:02:11 GMT

Hello Everyone:

I typed the previously posted algorithm from memory... sorry for
the mistakes in it.

What we're interested in is the Luhn code for the credit card. This
is what's used for validation...

This is how the Luhn code is calculated:

1) Double the value of alternate digits, starting with the rightmost (15th)
digit.  If this doubling results in a two-digit number, add each digit
together to derive a single digit (eg 6 * 2 = '12'; '12' = 1 + 2 = '3').

2) Add the individual digits derived in step 1 to the remaining unaffected
digits in the original number.

3) If the total obtained in step 2 ends in zero (eg 20, 30, etc.) then the
Luhn code is '0'.  If not subtract the total obtained in step 2 from the next
highest number ending in zero (ten's compliment of the low order digit).  The
result is the Luhn code.  The resulting Luhn code is then compared to the last
digit (16th or check digit) in the original field of data.  If it matches,
then the number is valid, if not then the number is invalid.

Example:

641205 00234 0106 4

Double alternate digits starting from righmost (non check digit):

Order here is left to right:

6 *2 = 12   sum two digit numbers: 1 + 2 = 3
1 *2 = 2
0 *2 = 0
0 *2 = 0
2 *2 = 4
4 *2 = 8
1 *2 = 2
6 *2 = 12   sum two digit numbers: 1 + 2 = 3

Add the results to those remaining from the original number:

3 + 4 + 2 + 2 + 0 + 5 + 0 + 0 + 4 + 3 + 8 + 0 + 2 + 0 + 3 = 36

The next highest number ending in zero is '40'.  40 - 36 = 4
(ie Ten's compliment of 6 is 4).  '4' is the Luhn code value and it matches
the check digit of the original number so the number is considered to be
valid.

Hope this clears things up.

Phil

--
GCS/E d(++) H s+: g? !p+ !au a- w+ v- C+++ U++ P+ N+++ y?
 E--- W+ !M V -po+ Y !tv b+++ D++ B-- e* u+ h+ f !r n----

--
GCS/E d(++) H s+: g? !p+ !au a- w+ v- C+++ U++ P+ N+++ y?
 E--- W+ !M V -po+ Y !tv b+++ D++ B-- e* u+ h+ f !r n----



Sat, 29 Nov 1997 03:00:00 GMT
 
 [ 6 post ] 

 Relevant Pages 

1. Storing Credit Card Number in SQL 7 DB

2. How to store credit card numbers?

3. Encrypting credit card numbers

4. Credit card numbers

5. Credit card numbers

6. encrypt credit card number

7. Store credit card number in db

8. Credit card numbers and expiry dates

9. Obscuring a credit card number

10. Credit card numbers

11. Help computing checksum for credit card numbers

12. !ACCEPT CREDIT CARDS ACCEPT CREDIT CARDS!


 
Powered by phpBB® Forum Software