Click here to Skip to main content
15,890,186 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,


I need to validate both credit and debit card numbers.I used LUHN's algorithm for credit card.It works fine (the no used is CREDIT -378282246310005),but when it comes to debit card its not validating.

the example i gave is (DEBIT -6200 0022 2222 2222)


Is there another algorithm i need to use for debit card?


Pls help!
Posted
Updated 2-Feb-14 22:01pm
v2
Comments
joginder-banger 3-Feb-14 3:47am    
what's type of validation you want?.this question not clear, what's you try?

 
Share this answer
 
I was almost sure that LUHN (Mod10) algorithm is good for CCs as well as DCs. But since you asked I double checked. Please see this[^]

[Please encourage participation by up-voting solutions or answers that work for you]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900