flutter-stripe / flutter_stripe

Flutter SDK for Stripe.
https://pub.dev/packages/flutter_stripe
930 stars 514 forks source link

paymentMethodOrder in PaymentElement #1862

Open Andrea951112 opened 1 month ago

Andrea951112 commented 1 month ago

It is possible to add the paymentMethodOrder parameter to the PaymentElement object?

here the Stripe docs for this feature https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-paymentMethodOrder

remonh87 commented 1 month ago

this is available in flutter_stripe_web 6.0.0

Andrea951112 commented 1 month ago

@remonh87 sorry, but i do not see this implementation in flutter_stripe_web 6.0.0, is still not possible to configure the paymentMethodOrder in the PaymentELement. The PaymentElementOptions are created using only the "layout" parameter.

Andrea951112 commented 1 month ago

@remonh87 this implementation is missing in flutter_stripe_web 6.0.0

remonh87 commented 1 month ago

it is here: https://github.com/flutter-stripe/flutter_stripe/blob/716dbdfd0581da10c2f1ba1d4c0cffd0d16de5d2/packages/stripe_js/lib/src/api/elements/payment_element_options.dart#L23

Andrea951112 commented 1 month ago

yes, is present in the options object, but is missing the personalization in the PaymentElement object

js.PaymentElementOptions elementOptions() { return js.PaymentElementOptions(layout: widget.layout); }

remonh87 commented 3 weeks ago

yes you are correct I added it to the options. Will be available next release