stripe / react-stripe-js

React components for Stripe.js and Stripe Elements
https://stripe.com/docs/stripe-js/react
MIT License
1.75k stars 267 forks source link

[BUG]: Not Possible to hide Paypal in Express Checkout Element #431

Closed zant23 closed 1 year ago

zant23 commented 1 year ago

What happened?

I am using the ExpressCheckoutElement and am trying to hide only Paypal, but display GooglePay and ApplePay..

Unfortunately there is no option for that currently. Or have i overlooked something? Will you support that in the near future?

Thanks for you help

Environment

No response

Reproduction

No response

brendanm-stripe commented 1 year ago

Are you using Express Checkout Element on its own, or along with other Elements? Broadly, you could adjust your payment method settings to disable paypal entirely. If you want it in other contexts (say within the Payment Element) then you might need to manage the payment methods for the ECE explicitly instead of automatically.

If you can say more about your overall integration and the result you're trying to achieve I can be more specific and provide examples.

zant23 commented 1 year ago

I have solved it with specifying the payment methods explicitly in the Element options. Yet of course the automatic payment method was a lot more confinient to use.

My use case is the following:

I am using Stripe Connect and use two instances of Express Checkout buttons.

As Paypal Checkout Button lags the support for direct charges for the time beeing. I am currently showing one instance for Google Pay and Apple Pay with direct Charges enabled and one for Paypal directly connected to the account via publishable and secretKey.

brendanm-stripe commented 1 year ago

Great, glad to hear you found something that works for you!

We're working on making automatic payment methods more flexible to support flows like yours :)