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

Fix: Apply dynamic Stripe account ID to confirmPayment method in WebS… #1798

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

Josefpa
Copy link
Contributor

@Josefpa Josefpa commented Jun 12, 2024

…tripe

Fixes a bug where updating the Stripe account ID using await Stripe.instance.applySettings(); did not apply to the confirmPayment() method on web platforms.

Bug Description:

  • Using await Stripe.instance.applySettings(); to update an account ID shows the updated account ID when printed but does not apply to the confirmPayment() method.
  • This issue occurs when attempting to update Stripe.stripeAccountId within the app, such as on the payment page.

Steps to Reproduce:

  1. Initialize a Stripe instance within main.dart, setting the Stripe publisher key (no account ID set).
  2. Have a page within the app that initializes Stripe and adds the Stripe connect ID: ```dart Stripe.stripeAccountId = id; await Stripe.instance.applySettings();

…tripe

Fixes a bug where updating the Stripe account ID using await Stripe.instance.applySettings(); did not apply to the confirmPayment() method on web platforms.

Bug Description:
- Using await Stripe.instance.applySettings(); to update an account ID shows the updated account ID when printed but does not apply to the confirmPayment() method.
- This issue occurs when attempting to update Stripe.stripeAccountId within the app, such as on the payment page.

Steps to Reproduce:
1. Initialize a Stripe instance within main.dart, setting the Stripe publisher key (no account ID set).
2. Have a page within the app that initializes Stripe and adds the Stripe connect ID:
   ```dart
   Stripe.stripeAccountId = id;
   await Stripe.instance.applySettings();
@Josefpa
Copy link
Contributor Author

Josefpa commented Jun 12, 2024

This creates a new instance of the stripe if the accountID is different, not sure if there is a way to do it on the same stripe instance but this fix worked for me on web

@jonasbark
Copy link
Member

Thanks!

@jonasbark jonasbark merged commit 528dac4 into flutter-stripe:main Jun 21, 2024
@appeventic
Copy link

@jonasbark @Josefpa Could you please help me, this is still not working, I have submitted all the details here #1945

Appreciate your help.

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

Successfully merging this pull request may close these issues.

3 participants