#Vane-payment intent

1 messages · Page 1 of 1 (latest)

ocean rain
#

👋 happy to help

solemn zephyr
#

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

ocean rain
#

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

solemn zephyr
#

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

ocean rain
solemn zephyr
ocean rain
#

the part in the .js where we're using fetch

solemn zephyr
ocean rain
#

let me know if you need any more help