invertase / stripe-firebase-extensions

Repository of Firebase Extensions built by Stripe.
https://firebase.google.com/products/extensions
Apache License 2.0
437 stars 167 forks source link

Supporting "payment_method_options" (to enable WeChat Pay) #471

Open PierreChavaroche opened 1 year ago

PierreChavaroche commented 1 year ago

Feature request

firestore-stripe-payments

Is your feature request related to a problem? Please describe.

To enable WeChat Pay via Stripe, "payment_method_options" seems to be mandatory:

checkoutSession.payment_method_options = {
    wechat_pay: {
        client: 'web',
    },
};

Stripe docs: https://stripe.com/docs/payments/wechat-pay/accept-a-payment?platform=checkout

Describe the solution you'd like

If "payment_method_options" has been provided, it should be considered by the "createCheckoutSession" function trigger

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

If "payment_method_options" has not been provided, the following error messages will appear:

WeChat Pay requires payment_method_options[wechat_pay][client] to be set to web.

Thank you very much!

emilwallner commented 1 year ago

I'm having the same problem, it would be great to add this.

PierreChavaroche commented 1 year ago

Hello all, any update when this feature could be implemented? Thank you very much!

emilwallner commented 6 days ago

Just saw that it's working now, thanks! By removing the payment_method_options.

For others who are stuck this is what I had to do: