Android Credit Card Check IsVISACreditCard(String UnformattedAccountNumber)

Here you can find the source of IsVISACreditCard(String UnformattedAccountNumber)

Description

Is VISA Credit Card

Declaration

private static boolean IsVISACreditCard(String UnformattedAccountNumber) 

Method Source Code

//package com.java2s;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    private static boolean IsVISACreditCard(String UnformattedAccountNumber) {
        Pattern p = Pattern.compile("^4[0-9]{12}(?:[0-9]{3})?$");
        Matcher m = p.matcher(UnformattedAccountNumber);
        return m.matches();
    }//ww w.j a v  a2 s.  c  o m
}

Related

  1. IsAmericanExpressCreditCard( String UnformattedAccountNumber)
  2. IsDinersClubCreditCard( String UnformattedAccountNumber)
  3. IsDiscoverCreditCard( String UnformattedAccountNumber)
  4. IsJCBCreditCard(String UnformattedAccountNumber)
  5. IsMasterCardCreditCard( String UnformattedAccountNumber)
  6. FindCreditCard(String AccountNumber)
  7. FormatAccountNumber( String UnformattedAccountNumber, int subGroupLength, String Seperator)
  8. FormatAmericanExpress( String UnformattedAccountNumber, String Seperator)
  9. FormatDinersClub(String UnformattedAccountNumber, String Seperator)