activate(_:withActivationData:completion:)
Activates a payment pass using the provided activation code.
Declaration
func activate(_ paymentPass: PKPaymentPass, withActivationData activationData: Data, completion: ((Bool, any Error) -> Void)? = nil)Parameters
- paymentPass:
The payment pass to activate.
- activationData:
The one-time cryptographic password.
PassKit encodes the data as Base64 and then sends it to the payment network. The framework treats this data as an opaque value.
- completion:
The completion block that PassKit calls after activation.
This block takes the following parameters:
Discussion
You can only activate a provisioned pass, and it must be in the PKPaymentPassActivationState.requiresActivation state.