Hi
I am curently testing a web application and part of that requires me to create some test credit card data to perform checks on each type of card there is. What I have is a spreadsheet with the following:
CARD_NAME - CARD_TYPE - CARD_LENGTH - PREFIX
solo debit 16 633450
visa credit 16 4535
Mastercard credit 14 52
The first check the system does is to check that the card entered begins with the correct PREFIX e.g. 633450. The secon is checks is that the CARD_LENGTH is correct length. So first of all I need a formula that generates a card number in another celll say E1 dependant on these these things e.g.
E1 for the first line would generate a number that is 16 numbers in length and starts 633450 (the 16 numbers include the 633450 so would need another 10).
To make this even harder there is another check the sytem does called a LUHN check which does the following:
To check the LUHN digit of a card number for example 6333 0410 0135 4512 , each digit is multiplied by the alternating factors 2 and 1 (last digit is always multiplied by 1). Of each calculation result, the digits of the results are summed together. Then these sums are totalised.
e.g.
6 3 3 3 0 4 1 0 0 1 3 5 4 5 1 2
x x x x x x x x x x x x x x x x
2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1
1+2 +3+6+3 4+2+ 1+6+5+ 8+5+2+2 =50
The result is divisible by 10 withut a remainder so the card passes the check.
So to recap:
The card must start with the relevant prefix included in the number. The lenght is generated dependant on the card length field and it MUST pass the LUHN check!!
Don't want much do I
I know this is probably not possible but I know how good you guys are so what do you think???? P[/b]
I am curently testing a web application and part of that requires me to create some test credit card data to perform checks on each type of card there is. What I have is a spreadsheet with the following:
CARD_NAME - CARD_TYPE - CARD_LENGTH - PREFIX
solo debit 16 633450
visa credit 16 4535
Mastercard credit 14 52
The first check the system does is to check that the card entered begins with the correct PREFIX e.g. 633450. The secon is checks is that the CARD_LENGTH is correct length. So first of all I need a formula that generates a card number in another celll say E1 dependant on these these things e.g.
E1 for the first line would generate a number that is 16 numbers in length and starts 633450 (the 16 numbers include the 633450 so would need another 10).
To make this even harder there is another check the sytem does called a LUHN check which does the following:
To check the LUHN digit of a card number for example 6333 0410 0135 4512 , each digit is multiplied by the alternating factors 2 and 1 (last digit is always multiplied by 1). Of each calculation result, the digits of the results are summed together. Then these sums are totalised.
e.g.
6 3 3 3 0 4 1 0 0 1 3 5 4 5 1 2
x x x x x x x x x x x x x x x x
2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1
1+2 +3+6+3 4+2+ 1+6+5+ 8+5+2+2 =50
The result is divisible by 10 withut a remainder so the card passes the check.
So to recap:
The card must start with the relevant prefix included in the number. The lenght is generated dependant on the card length field and it MUST pass the LUHN check!!
Don't want much do I
I know this is probably not possible but I know how good you guys are so what do you think???? P[/b]