OPPTokenPaymentParams
@objc
public final class OPPTokenPaymentParams : OPPBaseCardPaymentParams, NSCopying
Class to encapsulate all necessary transaction parameters for performing a token transaction.
-
The identifier of the token that can be used to reference the token later.
Declaration
Swift
@objc public private(set) var tokenID: String { get }
-
Creates an object representing a token transaction.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode
) andNSLocalizedDescription
to identify the reason of failure.Declaration
Swift
@objc public static func tokenPaymentParams(checkoutID: String, tokenID: String, paymentBrand: String?) throws -> OPPTokenPaymentParams
Parameters
checkoutID
The checkout ID of the transaction. Must be not
nil
or empty.tokenID
The identifier of the token that can be used to reference the token later.
paymentBrand
Payment brand of the tokenized transaction.
Return Value
An object representing a token transaction, and
nil
if parameters are invalid. -
Creates an object representing a token transaction.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode
) andNSLocalizedDescription
to identify the reason of failure.Declaration
Swift
@objc public static func tokenPaymentParams(checkoutID: String, tokenID: String, cardPaymentBrand: String?, cvv: String?) throws -> OPPTokenPaymentParams
Parameters
checkoutID
The checkout ID of the transaction. Must be not
nil
or empty.tokenID
The identifier of the token that can be used to reference the token later.
cardPaymentBrand
The payment brand of the tokenized card.
cvv
The cvv code found on the card.
Return Value
An object representing a token transaction, and
nil
if parameters are invalid. -
Creates an object representing a token transaction.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode
) andNSLocalizedDescription
to identify the reason of failure.Declaration
Swift
@objc public init(checkoutID: String, tokenID: String, paymentBrand: String?) throws
Parameters
checkoutID
The checkout ID of the transaction. Must be not
nil
or empty.tokenID
The identifier of the token that can be used to reference the token later.
paymentBrand
Payment brand of the tokenized transaction.
Return Value
An object representing a token transaction, and
nil
if parameters are invalid. -
Creates an object representing a token transaction.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode
) andNSLocalizedDescription
to identify the reason of failure.Declaration
Swift
@objc public init(checkoutID: String, tokenID: String, cardPaymentBrand: String?, cvv: String?) throws
Parameters
checkoutID
The checkout ID of the transaction. Must be not
nil
or empty.tokenID
The identifier of the token that can be used to reference the token later.
cardPaymentBrand
The payment brand of the tokenized card.
cvv
The cvv code found on the card.
Return Value
An object representing a token transaction, and
nil
if parameters are invalid.
-
Checks if the token identifier is valid to perform a transaction.
Declaration
Swift
@objc public static func isTokenIDValid(_ tokenID: String) -> Bool
Parameters
tokenID
The identifier of the token that can be used to reference the token later.
Return Value
true
if token identifier is alpha-numeric string of length 32.