BTCard
@objcMembers
public class BTCard : NSObject
The card tokenization request represents raw credit or debit card data provided by the customer. Its main purpose is to serve as the input for tokenization.
-
init(number:expirationMonth: expirationYear: cvv: postalCode: cardholderName: firstName: lastName: company: streetAddress: extendedAddress: locality: region: countryName: countryCodeAlpha2: countryCodeAlpha3: countryCodeNumeric: shouldValidate: authenticationInsightRequested: merchantAccountID: ) Creates a Card
Declaration
Swift
public init( number: String, expirationMonth: String, expirationYear: String, cvv: String, postalCode: String? = nil, cardholderName: String? = nil, firstName: String? = nil, lastName: String? = nil, company: String? = nil, streetAddress: String? = nil, extendedAddress: String? = nil, locality: String? = nil, region: String? = nil, countryName: String? = nil, countryCodeAlpha2: String? = nil, countryCodeAlpha3: String? = nil, countryCodeNumeric: String? = nil, shouldValidate: Bool = false, authenticationInsightRequested: Bool = false, merchantAccountID: String? = nil )Parameters
numberRequired: The card number.
expirationMonthRequired: The expiration month as a one or two-digit number on the Gregorian calendar.
expirationYearRequired: The expiration year as a two or four-digit number on the Gregorian calendar.
cvvRequired: The card verification code (like CVV or CID).
postalCodeOptional: The postal code associated with the card’s billing address.
cardholderNameOptional: The cardholder’s name.
firstNameOptional: First name on the card.
lastNameOptional: Last name on the card.
companyOptional: Company name associated with the card.
streetAddressOptional: The street address associated with the card’s billing address.
extendedAddressOptional: The extended address associated with the card’s billing address.
localityOptional: The city associated with the card’s billing address.
regionOptional: Either a two-letter state code (for the US), or an ISO-3166-2 country subdivision code of up to three letters.
countryNameOptional: The country name associated with the card’s billing address.
countryCodeAlpha2Optional: The ISO 3166-1 alpha-2 country code specified in the card’s billing address.
countryCodeAlpha3Optional: The ISO 3166-1 alpha-3 country code specified in the card’s billing address.
countryCodeNumericOptional: The ISO 3166-1 numeric country code specified in the card’s billing address.
shouldValidateControls whether or not to return validations and/or verification results. By default, this is not enabled.
authenticationInsightRequestedOptional: If authentication insight is requested. If this property is set to
true, amerchantAccountIDmust be provided. Defaults tofalse.merchantAccountIDOptional: The merchant account ID.
-
Creates a new instance of
BTCardwith only a CVV value, setting default values for all other parameters. This initializer should only be used if you wish to create a CVV-only payment method nonce to verify a card already stored in your Vault.Declaration
Swift
public convenience init(cvv: String)Parameters
cvvThe card verification code (like CVV or CID).
View on GitHub