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

Stripe.instance.confirmSetupIntent throws PaymentMethodError.cardPaymentMissingParams on iOS only #1124

Closed
remonh87 opened this issue Sep 12, 2022 · 2 comments · Fixed by #1151
Labels

Comments

@remonh87
Copy link
Collaborator

remonh87 commented Sep 12, 2022

Describe the bug
In the Flutter Stripe lib we got the following issue

To reproduce: Works on Android. Throws on iOS.

      await Stripe.instance.confirmSetupIntent(
        'paymentIntentClientSecret',
        PaymentMethodParams.cardFromMethodId(
          paymentMethodData: PaymentMethodDataCardFromMethod(
            paymentMethodId: 'paymentMethodId',
          ),
        ),
      );

Probably a bug is here:
Currently we only check for paymentMethodData?["token"] in line 159.
And then PaymentMethodError.cardPaymentMissingParams is thrown in line 166.
We should add similar check for paymentMethodData?["paymentMethodId"] like token check in lane 159.

private func createCardPaymentMethodParams() throws -> STPPaymentMethodParams {

User created a pull request on our lib but since we sync the SDK with this repo it would be better to fix it here. Pull request: https://github.com/flutter-stripe/flutter_stripe/pull/901/files

@asaarnak
Copy link

@charliecruzan-stripe Any news? Currently using my own patched version to fix this bug.

@charliecruzan-stripe
Copy link
Collaborator

fix is incoming today, this got lost in the shuffle. sorry for the wait!

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

Successfully merging a pull request may close this issue.

3 participants