confirmPayment method

Future<PaymentIntent> confirmPayment({
  1. required String paymentIntentClientSecret,
  2. PaymentMethodParams? data,
  3. PaymentMethodOptions? options,
})

Confirms a payment method, using the provided paymentIntentClientSecret and data.

See PaymentMethodParams for more details. The method returns a PaymentIntent. Throws a StripeException when confirming the paymentmethod fails.

Implementation

Future<PaymentIntent> confirmPayment({
  required String paymentIntentClientSecret,
  PaymentMethodParams? data,
  PaymentMethodOptions? options,
}) async {
  await _awaitForSettings();
  try {
    final paymentMethod = await _platform.confirmPayment(
      paymentIntentClientSecret,
      data,
      options,
    );
    return paymentMethod;
  } on StripeError {
    rethrow;
  }
}