CardNetwork

public enum CardNetwork: Int64

The CardNetwork enum depicts the Card Network type of a given Card object

  • Visa: Visa Card Network
  • MasterCard: MasterCard Network
  • AMEX: American Express Card Network
  • DinersClub: Diners Club Network
  • Maestro: Maestro Card Network
  • ChinaUnionPay: China UnionPay Network
  • Discover: Discover Network
  • InterPayment: InterPayment Network
  • InstaPayment: InstaPayment Network
  • JCB: JCB Network
  • Dankort: Dankort Network
  • UATP: UATP Network
  • Unknown: Unknown
  • Unknown

    Declaration

    Swift

    case Unknown = 0
  • Visa Card Network

    Declaration

    Swift

    case Visa = 1
  • MasterCard Network

    Declaration

    Swift

    case MasterCard = 2
  • Visa Electron Network

    Declaration

    Swift

    case VisaElectron = 3
  • Switch Network

    Declaration

    Swift

    case Switch = 4
  • Solo Network

    Declaration

    Swift

    case Solo = 5
  • Laser Network

    Declaration

    Swift

    case Laser = 6
  • China UnionPay Network

    Declaration

    Swift

    case ChinaUnionPay = 7
  • American Express Card Network

    Declaration

    Swift

    case AMEX = 8
  • JCB

    JCB Network

    Declaration

    Swift

    case JCB = 9
  • Maestro Card Network

    Declaration

    Swift

    case Maestro = 10
  • Visa Debit Card Network

    Declaration

    Swift

    case VisaDebit = 11
  • MasterCard Network

    Declaration

    Swift

    case MasterCardDebit = 12
  • Visa Purchasing Network

    Declaration

    Swift

    case VisaPurchasing = 13
  • Discover Network

    Declaration

    Swift

    case Discover = 14
  • Carnet Network

    Declaration

    Swift

    case Carnet = 15
  • Carte Bancaire Network

    Declaration

    Swift

    case CarteBancaire = 16
  • Diners Club Network

    Declaration

    Swift

    case DinersClub = 17
  • Elo

    Elo Network

    Declaration

    Swift

    case Elo = 18
  • Farmers Card Network

    Declaration

    Swift

    case FarmersCard = 19
  • Soriana Network

    Declaration

    Swift

    case Soriana = 20
  • Private Label Card Network

    Declaration

    Swift

    case PrivateLabelCard = 21
  • Q Card Network

    Declaration

    Swift

    case QCard = 22
  • Style Network

    Declaration

    Swift

    case Style = 23
  • True Rewards Network

    Declaration

    Swift

    case TrueRewards = 24
  • UATP Network

    Declaration

    Swift

    case UATP = 25
  • Bank Card Network

    Declaration

    Swift

    case BankCard = 26
  • Banamex Costco Network

    Declaration

    Swift

    case Banamex_Costco = 27
  • InterPayment Network

    Declaration

    Swift

    case InterPayment = 28
  • InstaPayment Network

    Declaration

    Swift

    case InstaPayment = 29
  • Dankort Network

    Declaration

    Swift

    case Dankort = 30
  • The string value of the receiver

    Declaration

    Swift

    public func stringValue() -> String

    Return Value

    a string describing the receiver

  • The prefixes determine which card network a number belongs to, this method provides an array with one or many prefixes for a given type

    Returns

    an Array containing all the possible prefixes for a type

    Declaration

    Swift

    public func prefixes() -> [String]

    Return Value

    an Array containing all the possible prefixes for a type

  • The card network type for a given card number string and constrained to a set of networks

    Declaration

    Swift

    public static func networkForString(string: String, constrainedToNetworks networks: [CardNetwork]) -> CardNetwork

    Parameters

    string

    the card number as a string

    networks

    the networks allowed for detection

    Return Value

    a CardNetwork if the prefix matches a given set of CardNetworks or CardNetwork.Unknown

  • The card network type for a given card number

    Declaration

    Swift

    public static func networkForString(string: String) -> CardNetwork

    Parameters

    string

    the card number as a string

    Return Value

    a CardNetwork if the prefix matches any CardNetwork prefix

  • Security code name for a certain card

    Returns

    a String for the title of a certain security code

    Declaration

    Swift

    public func securityCodeTitle() -> String

    Return Value

    a String for the title of a certain security code

  • Security code length for a card type

    Returns

    an Int with the code length

    Declaration

    Swift

    public func securityCodeLength() -> Int

    Return Value

    an Int with the code length

  • Get a CardLogoType from the receiving CardNetwork

    Declaration

    Swift

    public func cardLogoType() -> CardLogoType

    Return Value

    a CardLogoType