SavedCard
public class SavedCard: SavedPaymentMethod
This class contains saved credit or debit card payment method details.
Just like any other SavedPaymentMethod subclass, this class can be used
to finalize a payment without user interaction or to display a selection of saved
payment methods to the user for fast checkouts.
A SavedCard can be created by successfully completing a card payment or
with a dedicated registration.
-
Expiry date
Declaration
Swift
public private(set) var cardExpiryDate: CardExpiryDate? -
The masked card number you can use to display that specific card in your app. The masked card number shows the first 6 digits and the last 4 digits of the card, e.g. 432930xxxxxx6095.
Declaration
Swift
public private(set) var maskedCardNumber: String? -
Cardholder’s name
Declaration
Swift
public var cardholder: String? -
Initializes a
SavedCardobject with the given card data.Declaration
Swift
public init(type: PaymentMethodType, alias: String, cardExpiryDate: CardExpiryDate?, maskedCardNumber: String?, cardholder: String?)Parameters
typePayment method type, e.g. Visa
aliasThis is the alias for the card, also known as token. This can be used to debit the card without further customer interaction.
cardExpiryDateExpiry date
maskedCardNumberThe masked card number you can use to display that specific card in your app. The masked card number shows the first 6 digits and the last 4 digits of the card, e.g. 432930xxxxxx6095.
cardholderCardholder’s name
-
Checks if the expiration date is in the future or not.
Declaration
Swift
override public func isValid() -> Bool
View on GitHub