authenticatePayment method

Future<Map<String, dynamic>> authenticatePayment(
  1. String paymentIntentClientSecret,
  2. BuildContext context
)

Authenticate a payment. Returns the PaymentIntent. https://stripe.com/docs/payments/payment-intents/android-manual

Implementation

Future<Map<String, dynamic>> authenticatePayment(String paymentIntentClientSecret, BuildContext context) async {
  final Map<String, dynamic> paymentIntent = await api.retrievePaymentIntent(paymentIntentClientSecret);
  return _handlePaymentIntent(paymentIntent, context);
}