Spinbox Posted July 11, 2023 Posted July 11, 2023 I've made a change to the js file of the stripe payment module, removing the name input from payment methods. If I update the Padloper module in the future this will of course be overwritten. What's the best approach in changing such a thing? getPaymentElement: function (elements, mount_id) { const paymentElement = elements.create('payment', { fields: { billingDetails: { name: 'never', email: 'never', } } }); }, handleSubmit: async function (stripe, elements, event) { event.preventDefault() padloperPaymentStripe.setLoading(true) ///////////////////////// // @see: https://stripe.com/docs/payments/quickstart AND https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#enable-payment-methods const { error } = await stripe.confirmPayment({ elements, confirmParams: { payment_method_data: { billing_details : { name : document.getElementById("clientName").value, email : document.getElementById("clientEmail").value } }, // payment completion page return_url: PadloperPaymentStripe.getReturnURL(), }, }) ... }
kongondo Posted July 11, 2023 Posted July 11, 2023 Hi @Spinbox, 5 hours ago, Spinbox said: I've made a change to the js file of the stripe payment module, removing the name input from payment methods. This seems to be something injected by Stripe based on your settings in your Stripe dashboard. I don't see name inputs in my tests. Below is a screenshot of my Stripe payment fields: Could you check your dashboard settings please and let me know? Thanks.
Spinbox Posted July 11, 2023 Author Posted July 11, 2023 I honestly can't find an option to disable it inside Stripe. Read somewhere it could be location based. It's also only with iDeal, Klarna, Bancontact, but not with cc.
kongondo Posted July 11, 2023 Posted July 11, 2023 I see. I'll have a think about how devs can pass configs to the Stripe payment element. I think you should also confirm with Stripe/authorities that removing those fields will not go against the regulations for your country (including your customers' countries). 1
Spinbox Posted July 12, 2023 Author Posted July 12, 2023 Thank you, I'm actually sending the information in handelSubmit. You first have to hide them, but it's still required. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now