- I want to implement a Stripe payment gateway using verification. Sometimes users' banks send them OTP for security reasons and also for verification.
- I can't find any solutions for that.
Is there any support for implement Stripe payment gateway with valid OTP or other verification in Flutter?
656 views Asked by VimeshPatel At
2
There are 2 answers
0
On
Use flutter_stripe if user card is 3d secure call handleCardAction
method provide by stripe SDKs which accept payment_intent_client_secret
this method automatically redirect to bank verification page .
after verification it return status now you can handle your own view according to status.
final paymentIntent= await Stripe.instance.handleCardAction(
'payment_intent_client_secret');
switch (paymentIntent.status) {
case PaymentIntentsStatus.Succeeded:
// TODO: Handle this case.
break;
case PaymentIntentsStatus.RequiresPaymentMethod:
// TODO: Handle this case.
break;
case PaymentIntentsStatus.RequiresConfirmation:
// TODO: Handle this case.
break;
case PaymentIntentsStatus.RequiresAction:
// TODO: Handle this case.
break;
case PaymentIntentsStatus.RequiresCapture:
// TODO: Handle this case.
break;
case PaymentIntentsStatus.Unknown:
// TODO: Handle this case.
break;
case PaymentIntentsStatus.Canceled:
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
backgroundColor: Colors.red,
content: Text("Payment Cancelled")));
break;
case PaymentIntentsStatus.Processing:
// TODO: Handle this case.
break;
}
you can use flutter strip SDK for integrate stripe payment with many other functionalities. flutter_stripe