#Krishna_Awate
1 messages · Page 1 of 1 (latest)
I want to do that in react.
PaymentElement
<PaymentElement
id="card-element"
options={paymentElementOptions}
onChange={handleChange}
/>
const paymentElementOptions = {
wallets: {
wechat_pay: "never",
},
};
it is not working
How did you creat the PaymentIntent on backend, before feeding its clientSecret to this PaymentElement?
yes
const paymentIntent = await stripe.paymentIntents.create({
amount: calculateOrderAmount(items),
currency: "USD",
automatic_payment_methods: {
enabled: true,
},
});
Okie they you have to disable WeChatPay from https://dashboard.stripe.com/test/settings/payment_methods
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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'
}
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
hwo can we sepcify explicityly payment method and exclude wechat pay?
from here
Set this and remove the automatic_payment_method block https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_types
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.