Instance Method

activate(_:withActivationCode:completion:)

Activates a payment pass using the provided activation code.

Declaration

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

Parameters

paymentPass

The payment pass being activated.

activationCode

The activation code.

completion

The completion block called after activation.

This block takes the following parameters:

success

true if the pass was authorized; otherwise, false.

error

If success is false, a description of the error.

Discussion

The pass must already be provisioned, and it must currently be in the PKPaymentPassActivationState.requiresActivation state.

See Also

Deprecated

class func isPaymentPassActivationAvailable() -> Bool

A Boolean value that indicates whether the device supports adding payment passes.

Deprecated