confirmPayment method
Future<PaymentIntent>
confirmPayment({
- required String paymentIntentClientSecret,
- PaymentMethodParams? data,
- 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;
}
}