What is the code for Credit card no. validation in C#?
-
Depends on what you mean by validate. One of the other posts provide a link to do a simple check sum on the digits itself. This is a simple test that can be done in a GUI. A number that passes that test still might not be a valid number in that numbers have certain rules related to the card type (such as Visa.) There are simple methods that one can use to validate those however the only correct way requires that one get the bin numbers from a valid processor and check them. Of course a number is only valid if a processor accepts it. Doing that requires a lot of code and will be specific to each processor. Both of those make it pointless for anyone to post such solutions here. And none of that has anything at all to do with securing ecommerce payment applications.