luhn

Client-side verification of credit cards

Does anyone have a library or JavaScript snippet to verify the check digit of credit cards before the user hits Submit? ...

Algorithm for message code validation

Hi! If you read this thread before - forget everything I wrote, I must have been drunk when I wrote it. I'm starting over: I'm currently working on a project where we will be using some sort of algorithm for validating user input. There are three parties to consider; Client - Browsing our web pages Company - We, handling the Client r...

Does anyone know where there is c# code or a dll which can generate sample credit card numbers

For an application we are working on I need to generate sample credit card numbers which pass the Luhn algorithm but which are also unique, so we cannot use the sample credit card numbers. We need to be able to generate around 300 card numbers at a time, and ideally i would be able to do this when generating my input data. Many Thanks ...

Generating Luhn Checksums

There are lots of implementations for validating Luhn checksums but very few for generating them. I've come across this one however in my tests it has revealed to be buggy and I don't understand the logic behind the delta variable. I've made this function that supposedly should generated Luhn checksums but for some reason that I haven't...

Luhn check digit

I cant seem to figure out what is wrong with my check digit code! At times, it produces 2 length check digit values Example 1277531815000110 <-- check digit is double value?????? 1277532495000110 <-- check digit is double value??????? 1277534649000110 <-- check digit is double value??????? 127753185300011 <-- good! 127753208500019 <--...