Home > OS >  Is there any support for implement Stipe payment gateway with valid OTP or other verification in Flu
Is there any support for implement Stipe payment gateway with valid OTP or other verification in Flu

Time:04-18

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

CodePudding user response:

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

CodePudding user response:

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;
              }
  • Related