public enum CardType {
/**
* American Express cards start in 34 or 37
*/
AMEX("AmEx"),
/**
* Diners Club
*/
DINERSCLUB("DinersClub"),
/**
* Discover starts with 6x for some values of x.
*/
DISCOVER("Discover"),
/**
* JCB (see http://www.jcbusa.com/) cards start with 35
*/
JCB("JCB"),
/**
* Mastercard starts with 51-55
*/
MASTERCARD("MasterCard"),
/**
* Visa starts with 4
*/
VISA("Visa"),
/**
* Maestro
*/
MAESTRO("Maestro"),
/**
* Unknown card type.
*/
UNKNOWN("Unknown"),
/**
* Not enough information given.
* <br><br>
* More digits are required to know the card type. (e.g. all we have is a 3, so we don't know if
* it's JCB or AmEx)
*/
INSUFFICIENT_DIGITS("More digits required");