MCPcopy Create free account
hub / github.com/banq/jdonframework / isDiscover

Method isDiscover

src/main/java/com/jdon/util/UtilValidate.java:966–972  ·  view source on GitHub ↗

Checks to see if the cc number is a valid Discover number @param cc - a string representing a credit card number; Sample number: 6011000000000004(16 digits) @return true, if the credit card number is a valid Discover card number, false otherwise

(String cc)

Source from the content-addressed store, hash-verified

964 * @return true, if the credit card number is a valid Discover card number, false otherwise
965 */
966 public static boolean isDiscover(String cc) {
967 String first4digs = cc.substring(0, 4);
968
969 if ((cc.length() == 16) && (first4digs.equals("6011")))
970 return isCreditCard(cc);
971 return false;
972 }
973
974 /** Checks to see if the cc number is a valid EnRoute number
975 * @param cc - a string representing a credit card number; Sample number: 201400000000009(15 digits)

Callers 3

isAnyCardMethod · 0.95
getCardTypeMethod · 0.95
isCardMatchMethod · 0.95

Calls 1

isCreditCardMethod · 0.95

Tested by

no test coverage detected