Mod-10 Fake Credit Card Numbers for E-Commerce Testing

I recently developed a site that utilized a merchant gateway. I had the gateway in "Test" mode so i could process fake transactions to ensure the system was working properly.

The only fake credit card number I could use was 4111111111111111 which is denoted as a VISA card.

Anyhow, I wanted to make sure I could test with other numbers so I tried putting in random 16 digit numbers. Doing so caused the gateway to return an error, "Invalid Credit Card #"

The reason for this is because the credit card number was not a Mod-10 Credit card number. Mod-10 is used to validate credit card numbers.

Anyhow, here are 2 credit card numbers that you can use for credit card testing when interacting with a payment gateway in test mode:

1. 4111111111111111
2. 4111111111111103

How it verify Mod-10:

1. Take a credit card number and reverse it: 1111111111111114

2. Now multiple each even digit by 2.

1111111111111114
_2_2_2_2_2_2_2_2


Which is: 2+2+2+2+2+2+2+8 = 22

Note:If any results from your multiples of 2 are 2 digits or greater, then split the digits and add them together
So if 2x6=12 you would add (1+2) not 12
2+2+2+2+ (1 + 2)...


3. Now add the odd digits to 22, 22 + 1 + 1 + 1 +1 +1 +1 + 1 + 1 = 30

4. Now divide by 10

30/10 = 3

Since there is no remainder the card number is Mod-10. If there is a remainder, then the card # is NOT Mod-10

Now with this method you can come up with your own Mod-10 Numbers for testing.




Keywords: Mod-10 Credit Card Numbers


Submit a Comment