#Krishna_Awate

1 messages · Page 1 of 1 (latest)

spice lichenBOT
knotty matrix
#

I want to do that in react.

earnest jewel
#

Do you use Checkout Session?

#

or PaymentElement?

knotty matrix
#

PaymentElement

#

<PaymentElement
id="card-element"
options={paymentElementOptions}
onChange={handleChange}
/>

#

const paymentElementOptions = {
wallets: {
wechat_pay: "never",
},
};

#

it is not working

earnest jewel
#

How did you creat the PaymentIntent on backend, before feeding its clientSecret to this PaymentElement?

knotty matrix
#

yes

#

const paymentIntent = await stripe.paymentIntents.create({
amount: calculateOrderAmount(items),
currency: "USD",
automatic_payment_methods: {
enabled: true,
},
});

earnest jewel
knotty matrix
#

No. I want to do it from code side not from dash board

#

like I have done for apple pay and google pay

#

wallets; {

#

google_pay: 'never',

#

applet_pay: 'never'

#

}

earnest jewel
#

That's not possible AFAIK, sorry

#

Another way is controlling on backend, instead of automatic_payment_method, you specify explictly what payment methods you want, and exclude Wechatpay there

knotty matrix
#

hwo can we sepcify explicityly payment method and exclude wechat pay?

earnest jewel