Hi,
Anyone have any algorithm to validate Visa numbers
Look up "Luhn algorithm in C#". This will verify the card is numerically
valid, which is probably good enough for most basic checks. You ultimately
have to validate the card anyway. If you are not getting an auth before
shipping merchandise, you are being careless.
Technically, a card, to be valid, must pass Luhn and also have a correct
bin. Most methods out there simply check the first digit, which is fast,
but potentially inaccurate, as passing a Luhn and starting with a 4 does
not mean you have a card in a range that has even been "opened for
business" yet. To be accurate, you need the bins from Visa and check
against them.
Peace and Grace,
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: @gbworld
Blog:
http://gregorybeamer.spaces.live.com
My vacation and childhood cancer awareness site:
http://www.crazycancertour.com
*******************************************
| Think outside the box! |
*******************************************