#Vane-payment intent
1 messages · Page 1 of 1 (latest)
hey, thanks.
I had to do a work around of setting the prices
since php doesn't recognize javascript variables obviously
but another problem is, that when page gets loaded php code runs and it makes the order
it's better to make an Ajax call and have an endpoint in your own API that generates a payment intent and returns the client_secret
I've heard that from many but yet to understand how to make a Ajax call
can you show me a basic example? would help a lot.
also im guessing I can pass the price from ajax to php
you can read more about this here https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
or download an example here https://stripe.com/docs/payments/quickstart
I've been reading about this but I don't see where the ajax call is made
the part in the .js where we're using fetch
got it, this one helps a lot
let me know if you need any more help