OPPApplePayPaymentParams
@objc
public final class OPPApplePayPaymentParams : OPPPaymentParams
Class to encapsulate all necessary transaction parameters for performing an Apple Pay transaction.
-
UTF-8 encoded JSON dictionary of encrypted payment data. Ready for transmission to merchant’s e-commerce backend for decryption and submission to a payment processor’s gateway.
Declaration
Swift
@objc public let tokenData: Data?
-
Creates an object representing an Apple Pay transaction with brand APPLEPAY.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
@objc public static func applePayPaymentParams(checkoutID: String, tokenData: Data) throws -> OPPApplePayPaymentParamsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
Return Value
An object representing an Apple Pay transaction.
-
Creates an object representing an Apple Pay transaction.
Throws
the error that occurred while validating payment parameters. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
@objc public static func applePayPaymentParams(checkoutID: String, paymentBrand: String, tokenData: Data) throws -> OPPApplePayPaymentParamsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
paymentBrandThe payment brand of the transaction.
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
Return Value
An object representing an Apple Pay transaction.
-
Creates an object representing an Apple Pay transaction with brand APPLEPAY.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
@objc public static func applePayPaymentParams(checkoutID: String, tokenData: Data, billingContact: PKContact?, shippingContact: PKContact?) throws -> OPPApplePayPaymentParamsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
billingContactBilling contact object of payment.
shippingContactShipping contact object of payment.
Return Value
An object representing an Apple Pay transaction.
-
Creates an object representing an Apple Pay transaction.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
@objc public static func applePayPaymentParams(checkoutID: String, paymentBrand: String, tokenData: Data, billingContact: PKContact?, shippingContact: PKContact?) throws -> OPPApplePayPaymentParamsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
paymentBrandThe payment brand of the transaction.
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
billingContactBilling contact object of payment.
shippingContactShipping contact object of payment.
Return Value
An object representing an Apple Pay transaction.
-
applePayPaymentParams(checkoutID:paymentBrand:tokenData:billingContact:shippingContact:cardType:cardNetwork:)Creates an object representing an Apple Pay transaction.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
@objc public static func applePayPaymentParams(checkoutID: String, paymentBrand: String, tokenData: Data, billingContact: PKContact?, shippingContact: PKContact?, cardType: PKPaymentMethodType, cardNetwork: PKPaymentNetwork?) throws -> OPPApplePayPaymentParamsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
paymentBrandThe payment brand of the transaction.
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
billingContactBilling contact object of payment.
shippingContactShipping contact object of payment.
cardTypeType of card used for payment.
cardNetworkNetwork of card used for payment.
Return Value
An object representing an Apple Pay transaction.
-
Creates an object representing an Apple Pay transaction with brand APPLEPAY.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
@objc public convenience init(checkoutID: String, tokenData: Data) throwsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
Return Value
An object representing an Apple Pay transaction.
-
Creates an object representing an Apple Pay transaction.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
@objc public init(checkoutID: String, paymentBrand: String, tokenData: Data) throwsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
paymentBrandThe payment brand of the transaction.
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
Return Value
An object representing an Apple Pay transaction.
-
Creates an object representing an Apple Pay transaction with brand APPLEPAY.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
@objc public convenience init(checkoutID: String, tokenData: Data, billingContact: PKContact?, shippingContact: PKContact?) throwsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
billingContactBilling contact object of payment.
shippingContactShipping contact object of payment.
Return Value
An object representing an Apple Pay transaction.
-
Creates an object representing an Apple Pay transaction.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
@objc public init(checkoutID: String, paymentBrand: String, tokenData: Data, billingContact: PKContact?, shippingContact: PKContact?) throwsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
paymentBrandThe payment brand of the transaction.
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
billingContactBilling contact object of payment.
shippingContactShipping contact object of payment.
Return Value
An object representing an Apple Pay transaction.
-
Creates an object representing an Apple Pay transaction.
Throws
The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
@objc public init(checkoutID: String, paymentBrand: String, tokenData: Data, billingContact: PKContact?, shippingContact: PKContact?, cardType: PKPaymentMethodType, cardNetwork: PKPaymentNetwork?) throwsParameters
checkoutIDThe checkout ID of the transaction. Must be not nil or empty.
paymentBrandThe payment brand of the transaction.
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
billingContactBilling contact object of payment.
shippingContactShipping contact object of payment.
cardTypeType of card used for payment.
cardNetworkNetwork of card used for payment.
Return Value
An object representing an Apple Pay transaction.
-
Checks if the token data is valid to perform a transaction.
Declaration
Swift
@objc public static func isTokenDataValid(_ tokenData: Data) -> BoolParameters
tokenDataUTF-8 encoded JSON dictionary of encrypted payment data.
Return Value
trueif the token data is not empty.
OPPApplePayPaymentParams Class Reference