Card

public struct Card

Card

Card objects store all the necessary card information for making transactions

  • The minimum card length constant

    Declaration

    Swift

    public static let minimumLength = 12
  • The maximum card length constant

    Declaration

    Swift

    public static let maximumLength = 19
  • The card number should be submitted without any whitespace or non-numeric characters

    Declaration

    Swift

    public var number: String
  • The expiry date should be submitted as MM/YY

    Declaration

    Swift

    public let expiryDate: String
  • CV2 from the credit card, also known as the card verification value (CVV) or security code. It’s the 3 or 4 digit number on the back of your credit card

    Declaration

    Swift

    public var securityCode: String
  • The registered add ress for the card

    Declaration

    Swift

    public let address: Address?
  • The start date if the card is a Maestro

    Declaration

    Swift

    public let startDate: String?
  • The issue number if the card is a Maestro

    Declaration

    Swift

    public let issueNumber: String?
  • Designated initializer for the Card struct

    Declaration

    Swift

    public init(number: String, expiryDate: String, securityCode: String, address: Address? = nil, startDate: String? = nil, issueNumber: String? = nil)

    Parameters

    number

    The card number (long number)

    expiryDate

    The expiry date of the card

    cv2

    The security code number of the card

    address

    The address of the card holder where the account is registered (AVS)

    startDate

    In case of transacting with maestro cards, the start date (optional)

    issueNumber

    In case of transacting with maestro cards, the issue number (optional)

    Return Value

    a Card object

  • Card.Configuration

    Card Configuration consists of a Card Network and a given length

    See more

    Declaration

    Swift

    public struct Configuration
  • Undocumented

    Declaration

    Swift

    public struct Card