handleNextAction method

Future<PaymentIntent> handleNextAction(
  1. String paymentIntentClientSecret, {
  2. String? returnURL,
})

Use this method in case the PaymentIntent status is PaymentIntentsStatus.RequiresAction. Executing this action can take several seconds and it is important to not resubmit the form.

Throws a StripeException when confirming the handle card action fails.

Implementation

Future<PaymentIntent> handleNextAction(
  String paymentIntentClientSecret, {
  String? returnURL,
}) async {
  await _awaitForSettings();
  try {
    final paymentIntent = await _platform.handleNextAction(
      paymentIntentClientSecret,
      returnURL: returnURL,
    );
    return paymentIntent;
  } on StripeError {
    //throw StripeError<CardActionError>(error.code, error.message);
    rethrow;
  }
}