Can generate valid credit card numbers for VISA, Amex, Mastercard, Diners, Discover, EnRoute, JCB, Voyager
A node.js library for generating test credit card numbers. The card numbers are valid with respect to the Luhn algorithm (Mod 10 test). https://en.wikipedia.org/wiki/Luhn_algorithm
GenCCScheme numberOfCards pseudoRandomFunction;
pseudoRandomFunction must supply random numbers between 0 to 1. Use this in conjunction with a seeded random number generator to reproduce test data.
generator = require'creditcard-generator'generatorGenCC;//Will return 1 MasterCardNumbergeneratorGenCC"Amex";//Will return 1 Amex numbergeneratorGenCC"VISA" 10;//Will return 10 VisaCards numbersgeneratorGenCC"Mastercard" 3 Mathrandom//Will generator 3 Mastercard numbers using the standard random function
All contributions are welcome. Please supply tests.
Project forked from https://github.com/grahamking/darkcoding-credit-card