#Svit-WeChat-Pay
1 messages · Page 1 of 1 (latest)
we meet again
🙂
yha
Are you asking how you insert the client secret there?
yes but it is in front end so how do i do it 'safly'
You fetch it from the backend
This is not your Secret API Key
This is the PaymentIntent's client secret
As long as you aren't embedding that client secret anywhere, it is safe to have it in your frontend.
How do i fetch it to backend
<%= key %> this way
and how do i get PaymentIntent's client secret
The most basic way to retrieve it from your backend is to use the Fetch API: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API