Jump to content

Change in stripe payment module


Spinbox
 Share

Recommended Posts

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(),
		},
	})
	...
}

 

Link to comment
Share on other sites

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:

padloper_stripe_fields.png.32f7a966d75b81cc8c43d028c4bb9e7f.png

Could you check your dashboard settings please and let me know? Thanks.

 

Link to comment
Share on other sites

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).

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...