Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error in deferred PaymentSheet in iOS #1834

Closed
pgiacomo69 opened this issue Jul 5, 2024 · 1 comment
Closed

Strange error in deferred PaymentSheet in iOS #1834

pgiacomo69 opened this issue Jul 5, 2024 · 1 comment
Labels
needs triage Needs triage
Milestone

Comments

@pgiacomo69
Copy link
Contributor

pgiacomo69 commented Jul 5, 2024

In iOS the Credit Card Payment (deferred PaymentSheet) is unsuccesful, with a message:
"An error occurred in PaymentSheet. Your PaymentIntent setupFutureUsage (none) does not match the PaymentSheet.IntentConfiguration setupFutureUsage (Optional (StripePaymentSheet.PaymentSheet.IntentConfi guration.SetupFutureUsage.onSession))."

Apple Pay works well. Same App in Android Emulator works perfectly.

Steps to reproduce the behavior:

  1. Launch the "Stripe Example" App
  2. Select "Single step (differed payment)" from "payment Sheet" demos
  3. Enter the fake card data.
  4. Tap the confirm button.
  5. Observe the failure.

Smartphone / tablet**

  • Device: IPhone 15 Pro Emulator
  • OS: iOS 17
  • Package version: >=10.1
  • Flutter version 3.22

Additional context
Add any other context about the problem here.

`await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
merchantDisplayName: 'Flutter Stripe Store Demo',
allowsDelayedPaymentMethods: true,
intentConfiguration: IntentConfiguration(

          mode: IntentMode(
            setupFutureUsage: null,
            currencyCode: 'eur',
            amount: amount,
          ),

          confirmHandler: (method, saveFuture) {
            _createIntentAndConfirmToUser(method);
          }),

      // Extra params
      primaryButtonLabel: 'Pay now',
      applePay: const PaymentSheetApplePay(
        merchantCountryCode: 'DE',
      ),
      googlePay: const PaymentSheetGooglePay(
        merchantCountryCode: 'DE',
        testEnv: true,
      ),

      style: ThemeMode.light,
      appearance: const PaymentSheetAppearance(
        colors: PaymentSheetAppearanceColors(
            /*  background: Colors.white,
          componentBackground: Colors.white,
          componentText: Colors.black,
          primary: Colors.blue,
          componentBorder: Colors.black,
          placeholderText: Colors.black,
          primaryText: Colors.black,
          secondaryText: Colors.green, */

            ),
        shapes: PaymentSheetShape(
          borderWidth: 0.5,
          borderRadius: 8,
          shadow: PaymentSheetShadowParams(color: Colors.yellow),
        ),
        primaryButton: PaymentSheetPrimaryButtonAppearance(
          shapes: PaymentSheetPrimaryButtonShape(blurRadius: 8),
          colors: PaymentSheetPrimaryButtonTheme(
            light: PaymentSheetPrimaryButtonThemeColors(
              background: Color.fromARGB(255, 231, 235, 30),
              text: Color.fromARGB(255, 235, 92, 30),
              border: Color.fromARGB(255, 235, 92, 30),
            ),
          ),
        ),
      ),
      billingDetails: billingDetails,
    ),
  );`
@pgiacomo69 pgiacomo69 added the needs triage Needs triage label Jul 5, 2024
@pgiacomo69 pgiacomo69 changed the title STran Strange error in defferred PaymentHeet in iOS Jul 5, 2024
@pgiacomo69 pgiacomo69 changed the title Strange error in defferred PaymentHeet in iOS Strange error in deferred PaymentSheet in iOS Jul 5, 2024
pgiacomo69 pushed a commit to pgiacomo69/flutter_stripe that referenced this issue Jul 8, 2024
@remonh87 remonh87 added this to the 10.2 milestone Jul 9, 2024
pgiacomo69 pushed a commit to pgiacomo69/flutter_stripe that referenced this issue Jul 9, 2024
pgiacomo69 pushed a commit to pgiacomo69/flutter_stripe that referenced this issue Jul 10, 2024
@daijintaozz
Copy link

I encountered the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs triage
Projects
None yet
Development

No branches or pull requests

3 participants