retrievePaymentIntent method

Future<PaymentIntent> retrievePaymentIntent(
  1. String clientSecret
)

Retrieves a PaymentIntent using the provided clientSecret.

Throws a StripeException in case retrieving the intent fails.

Implementation

Future<PaymentIntent> retrievePaymentIntent(String clientSecret) async {
  await _awaitForSettings();
  try {
    final paymentMethod = await _platform.retrievePaymentIntent(clientSecret);
    return paymentMethod;
  } on StripeError catch (error) {
    throw StripeError(message: error.message, code: error.message);
  }
}