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

Payment Methods inconsistencies when using PaymentSheet in deferred mode #1837

Closed
pgiacomo69 opened this issue Jul 9, 2024 · 0 comments · Fixed by #1839
Closed

Payment Methods inconsistencies when using PaymentSheet in deferred mode #1837

pgiacomo69 opened this issue Jul 9, 2024 · 0 comments · Fixed by #1839
Labels
needs triage Needs triage

Comments

@pgiacomo69
Copy link
Contributor

When using PaymentSheet in 'Deferred Mode' the allowed payment methods can't come from intent, because the intent will be generated only after the user has choosen a payment method. Payment methods that will be shown should are those selected in Stripe Settings. From code we should be able to further filtering allowed payment methods by giving an array when istantiating IntentConfiguration.

With current code we have two problems:

  1. In iOS, payment methods like iDeal and PayPayl won't be shown
  2. In Android all configured payment methods are shown, regardless of wich values we put in paymentMethodTypes array in intentConfiguration

To Reproduce
Steps to reproduce the behavior:

  1. Enable PayPal, an other payment types in your Stripe account
  2. Add paymentMethodTypes: ['card','paypal'], in IntentConfiguration at 'initPaymentSheet' method of payment_sheet_deffered_screen.dart file
  3. Run the example App
  4. Launch 'Single Step (deferred payment)' demo from 'Payment Sheet' group
  5. In iOS: Observe that only 'Card' Payment is shown
  6. In Android: Observe that all configured payment methods are shown, even if not present in paymentMethodTypes array.

Solution:

  1. iOS: A return Url should be configured when configuring the payment sheet
  2. Android: JSONArray is missing from possible tipes in ReadableMap.java from stripe_android package

A PR will be submitted to address this issue.

@pgiacomo69 pgiacomo69 added the needs triage Needs triage label Jul 9, 2024
@pgiacomo69 pgiacomo69 changed the title Payment Methods inconcistencies when using PaymentSheet in deferred mode Payment Methods inconsistencies when using PaymentSheet in deferred mode Jul 9, 2024
pgiacomo69 pushed a commit to pgiacomo69/flutter_stripe that referenced this issue Jul 9, 2024
remonh87 added a commit that referenced this issue Jul 17, 2024
* Fixes #1834

* Fixes #1837

* Rollback Stripe Sdk Changes, Alternative solution for #1834

* Rollback Change on Stripe Ios Sdk

---------

Co-authored-by: Giacomo Policicchio <[email protected]>
Co-authored-by: Rémon <[email protected]>
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
1 participant