View
extension View
-
Confirm the payment, presenting a sheet for the user to confirm their payment if needed.
Declaration
Swift
public func paymentConfirmationSheet( isConfirmingPayment: Binding<Bool>, paymentIntentParams: STPPaymentIntentParams, onCompletion: @escaping STPPaymentHandlerActionPaymentIntentCompletionBlock ) -> some View
Parameters
isConfirmingPayment
A binding to whether the payment is being confirmed. This will present a sheet if needed. It will be updated to
false
after performing the payment confirmation.paymentIntentParams
A PaymentIntentParams to confirm.
onCompletion
Called with the result of the payment after the payment confirmation is done and the sheet (if any) is dismissed.
-
Confirm the SetupIntent, presenting a sheet for the user to confirm if needed.
Declaration
Swift
public func setupIntentConfirmationSheet( isConfirmingSetupIntent: Binding<Bool>, setupIntentParams: STPSetupIntentConfirmParams, onCompletion: @escaping STPPaymentHandlerActionSetupIntentCompletionBlock ) -> some View
Parameters
isConfirmingSetupIntent
A binding to whether the SetupIntent is being confirmed. This will present a sheet if needed. It will be updated to
false
after performing the SetupIntent confirmation.paymentIntentParams
A SetupIntentParams to confirm.
onCompletion
Called with the result of the SetupIntent confirmation after the confirmation is done and the sheet (if any) is dismissed.