#Chuplag

1 messages · Page 1 of 1 (latest)

analog lava
#

@south flax hi! What question do you have?

south flax
#

So I trying to add a stripe payment but the thing is the price of the product is fully dynamic. So I can't pre define the product price on stripe. Which is why am trying to use https://stripe.com/docs/payments/integration-builder but how do I grab the final price of the product and pass it on to stripe payment?

Learn how to embed a custom Stripe payment form in your website or application.

analog lava
#

are you using Checkout or PaymentIntents? ('prebuilt Checkout page' or 'custom payment form') , and which would you want to use?

south flax
#

I am using "Custom payment form"

analog lava
#

then the amount is decided by what you pass to amount when creating the PaymentIntent on your backend server.

#

we have that calculateOrderAmount function as a placeholder for the business code you would write to decide that (like pulling it from your shopping cart or database etc)

south flax
#

The thing is the site is Umbraco site and I have used JavaScript to calculate the form.

#

And when loading the page it shows me an error with client.js file which I assume is happening because of purchase JSON bit

analog lava
south flax
#

Could we pass the final price with JavaScript?

analog lava
#

well you can but bear in mind the security implications