Contents

paymentAuthorizationViewController(_:didAuthorizePayment:handler:)

Tells the delegate that the user authorized the payment request, and asks for a result.

Declaration

optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, handler completion: @escaping  @Sendable (PKPaymentAuthorizationResult) -> Void)
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment) async -> PKPaymentAuthorizationResult

Parameters

  • controller:

    The payment authorization view controller.

  • payment:

    The authorized payment. This object contains the payment token you need to submit to your payment processor, as well as the billing and shipping information required by the payment request.

  • completion:

    The completion handler to call with the result of authorizing the payment.

Discussion

The system calls this method after it authorizes the payment request. You submit the payment information to your payment processor to authorize the transaction, and then call the completion handler.

See Also

Handling user’s payment authorization