Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-10-2008, 05:45 PM
davidmal davidmal is offline
Junior Member
 
Join Date: Aug 2008
Posts: 1
davidmal is on a distinguished road
Credit Card Account Number Validation LUHN formula
Hello all,

Not sure if this is the correct forum for this but here goes. I am a Web Developer creating a website with a merchant account for a client. While writing the scripts to validate the information the site visitor has submitted before sending it to CyberSource for processing, I came to the part of the form with Card type and Account Number. I did some Google'ing and got to a page that explains that each card has account numbers with specified lengths and prefixes. That helps, but I found more...

One page I found explains the LUHN mod 10 formula. At the time that page was created in 1997, this algorithm applied correctly to Visa, MasterCard, AmEx and Discover which are the cards accepted by my clients site. I do not want to programmatically reject cards that are actually valid, but it would be nice to catch a mis-keyed account number or mis-selected card type before submittal to the payment gateway.

Does anybody know if the LUHN mod 10 formula (aka; The CheckDigit algorithm) is still valid for all Visa, MasterCard, AmEx and Discover card numbers???

Dave


Reply With Quote
  #2 (permalink)  
Old 09-01-2008, 04:06 AM
sahilmiddha sahilmiddha is offline
Senior Member
 
Join Date: May 2008
Posts: 185
sahilmiddha is on a distinguished road
i think u should ask this question in any form where web designing and gateway matters are discussed. i don't think u ll get your answer in credit card forms.
Reply With Quote
  #3 (permalink)  
Old 09-03-2008, 09:19 AM
FredLJack FredLJack is offline
Junior Member
 
Join Date: Jun 2008
Posts: 7
FredLJack is on a distinguished road
This is still valid. To get a somewhat outdated listing of the BIN numbers (prefixes) download the Mars Bank program: Mars Software :: Downloads
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 12:22 PM.



SEO by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.