Instance Method

dismiss(completion:)

Dismisses the payment sheet.

Declaration

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

Parameters

completion

A block that is called after the sheet is dismissed.

Discussion

Call this method when you receive the paymentAuthorizationControllerDidFinish(_:) delegate callback, or otherwise want to dismiss the payment sheet.

See Also

Handling User Interactions

protocol PKPaymentAuthorizationControllerDelegate

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

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

Presents the payment sheet modally over your app.