Contents

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:

    success

    True if the authorization succeeds; otherwise, False.

    error

    If success is False, a description of the error.

Discussion

You can only activate a provisioned pass, and it must be in the PKPaymentPassActivationState.requiresActivation state.

See Also

Deprecated Methods