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

Method isVisa

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

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

(String cc)

Source from the content-addressed store, hash-verified

904 * @return true, if the credit card number is a valid VISA number, false otherwise
905 */
906 public static boolean isVisa(String cc) {
907 if (((cc.length() == 16) || (cc.length() == 13)) && (cc.substring(0, 1).equals("4")))
908 return isCreditCard(cc);
909 return false;
910 }
911
912 /** Checks to see if the cc number is a valid Master Card number
913 *

Callers 3

isAnyCardMethod · 0.95
getCardTypeMethod · 0.95
isCardMatchMethod · 0.95

Calls 1

isCreditCardMethod · 0.95

Tested by

no test coverage detected