Is there any support for implement Stripe payment gateway with valid OTP or other verification in Flutter?

664 views Asked by At
  1. I want to implement a Stripe payment gateway using verification. Sometimes users' banks send them OTP for security reasons and also for verification.
  2. I can't find any solutions for that.
2

There are 2 answers

4
Mayur Devmurari On

you can use flutter strip SDK for integrate stripe payment with many other functionalities. flutter_stripe

0
Ashutosh singh 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;
              }