Instance Method

present(completion:)

Presents the payment sheet modally over your app.

Declaration

func present(completion: ((Bool) -> Void)? = nil)

Parameters

completion

A block that is called after the sheet is presented. This block is passed the following parameters:

success

A Boolean value that indicates whether the payment sheet was successfully presented. true if the payment sheet was presented successfully; otherwise, false.

Discussion

You are responsible for dismissing the payment sheet.

See Also

Handling User Interactions

protocol PKPaymentAuthorizationControllerDelegate

Methods that let you respond to user interactions with your payment authorization controller.

func dismiss(completion: (() -> Void)?)

Dismisses the payment sheet.