Contents

activate(_:withActivationCode:completion:)

Activates a payment pass using the provided activation code.

Declaration

func activate(_ paymentPass: PKPaymentPass, withActivationCode activationCode: String, completion: ((Bool, any Error) -> Void)? = nil)

Parameters

  • paymentPass:

    The payment pass to activate.

  • activationCode:

    The activation code.

  • completion:

    The completion block that PassKit calls after activation.

    This block takes the following parameters:

    success

    True if 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