Card

@objc(DTCard)
@objcMembers
public class Card : PaymentMethod

Use this class to process raw card data for payments. You should use this class if your app takes over the user interface for the card input fields.

  • Card number

    Declaration

    Swift

    public var number: String
  • Expiry date

    Declaration

    Swift

    public var expiryDate: CardExpiryDate
  • cvv

    Card security code - nil if the card does not have a card security code.

    Declaration

    Swift

    public var cvv: String?
  • Cardholder’s name (as written on the card)

    Declaration

    Swift

    public var cardholder: String?
  • Use this to initialize a card object with the card data.

    Declaration

    Swift

    public init(type: PaymentMethodType, number: String, expiryDate: CardExpiryDate, cvv: String?, cardholder: String?)

    Parameters

    type

    Card type, e.g. Visa or Mastercard

    number

    Card number

    expiryDate

    Expiry date

    cvv

    Card security code - nil if the card does not have a card security code.

    cardholder

    Cardholder’s name (as written on the card)