Permalink
Browse files

[minor] Added a list of known testing numbers for different creditcar…

…d schemes.
  • Loading branch information...
1 parent 9cb559e commit 4d04c503ca3cf0d9a0e8bd7f0de8ac79a2ce9528 @3rd-Eden 3rd-Eden committed Dec 1, 2012
Showing with 30 additions and 0 deletions.
  1. +30 −0 lib/creditcard.js
View
@@ -23,6 +23,36 @@ exports.mii = exports.MII = [
];
/**
+ * Test numbers from different creditcard schemes. Most of them are taken from
+ * http://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm
+ *
+ * @type {Array}
+ */
+exports.testnumbers = [
+ 4222222222222 // visa
+ , 4012888888881881 // visa
+ , 4111111111111111 // visa
+ , 5105105105105100 // mastercard
+ , 5555555555554444 // mastercard
+ , 3566002020360505 // jbc
+ , 3530111333300000 // jbc
+ , 6011000990139424 // discover
+ , 6011111111111117 // discover
+ , 6011601160116611 // discover
+ , 38520000023237 // diners club
+ , 30569309025904 // diners club
+ , 378734493671000 // american express
+ , 371449635398431 // american express
+ , 378282246310005 // american express
+ , 341111111111111 // american express
+ , 5431111111111111 // mastercard
+ , 5610591081018250 // australian bank
+ , 76009244561 // dankort pbs
+ , 5019717010103742 // dankort pbs
+ , 6331101999990016 // switch/solo paymentech
+];
+
+/**
* Find out which major card scheme issued the card based on the iin range.
*
* @param {String} number

0 comments on commit 4d04c50

Please sign in to comment.