Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Credit card number validation class?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00124636
Message ID:
00131429
Vues:
22
>>>Does anyone know of a public one that validates all current credit card numbers/type? If not, we should definitely make an effort and load (with donations) the file library at the UT with tools such as this one. Like they say: why reinvent the wheel?
>>>
>>>
>>>TIA
>>>
>>>Gil
>>
>>Gil,
>>I decided to take you up on your challenge. I have developed a credit card validation class and will be uploading it to the file library today. It supports Visa, MAsterCard, Discover, American Express and Diners Club. It also has a method to add new card types.
>>
>>I used some code posted by Rick Strahl last year and additonal information from Ralph Morse on the FoxShare list to create the class. Thanks to both of them for their contributions
>
>If your class works well, it will be very timely for me. I've been looking into this for a client and need to have it by years end. How do you handle testing?
>
>Thanks,

To really test it you will need some credit card numbers to run through it. Your client can probably come up with a list of card numbers for testing. I did some limited testing by running my past and present credit card numbers through the check routine it identified and validated all of them. The cards I tested included examples of all the card types the class is designed for (Visa, MasterCard, Discover, American Express and Diners Club). I also entered some numbers with incorrect digits and/or lengths and they were all rejected. It looks like the check digit code I got from Rick does its job. Let me know if you have any problems with it.
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform