- 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.
Asked
Active
Viewed 472 times
-2

Arijeet
- 935
- 5
- 19

VimeshPatel
- 25
- 5
2 Answers
1
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;
}

Ashutosh singh
- 820
- 6
- 17
0
you can use flutter strip SDK for integrate stripe payment with many other functionalities. flutter_stripe

Mayur Devmurari
- 54
- 7
-
Can I verify OTP in this? – VimeshPatel Apr 18 '22 at 08:20
-
no, you can't but flutter is open source so if you need to change the library than you can do it. but I think for only verifying mobile numbers no need to change library. please give me a full description of exactly what you want so I can give you proper flow. – Mayur Devmurari Apr 18 '22 at 21:20
-
I want to implement stripe in the flutter. In some cases, the user's bank verifies the payment via OTP at that time how does it all work? I don't have flow for that. – VimeshPatel May 05 '22 at 06:26
-
@VimeshPatel you can check my answer if you are using same package `flutter_stripe` it will be work – Ashutosh singh Oct 03 '22 at 06:28