- /**
- * build table of which ranges of credit card number belong to which vendor
- */
- private static void buildRanges() {
- // careful, no lead zeros allowed
- // low high len vendor mod-10?
- ranges = new LCR[] { new LCR(4000000000000L, 4999999999999L, 13, VISA, true), new LCR(30000000000000L, 30599999999999L, 14, DINERS, true),
- new LCR(36000000000000L, 36999999999999L, 14, DINERS, true), new LCR(38000000000000L, 38999999999999L, 14, DINERS, true),
- new LCR(180000000000000L, 180099999999999L, 15, JCB, true), new LCR(201400000000000L, 201499999999999L, 15, ENROUTE, false),
- new LCR(213100000000000L, 213199999999999L, 15, JCB, true), new LCR(214900000000000L, 214999999999999L, 15, ENROUTE, false),
- new LCR(340000000000000L, 349999999999999L, 15, AMEX, true), new LCR(370000000000000L, 379999999999999L, 15, AMEX, true),
- new LCR(3000000000000000L, 3999999999999999L, 16, JCB, true), new LCR(4000000000000000L, 4999999999999999L, 16, VISA, true),
- new LCR(5100000000000000L, 5599999999999999L, 16, MASTERCARD, true), new LCR(6011000000000000L, 6011999999999999L, 16, DISCOVER, true) }; // end table
- // initialisation
- }
-
- /**
- * Finds a matching range in the ranges array for a given creditCardNumber.
- *
- * @param creditCardNumber number on card.
- *