#Aimer-Migration
1 messages · Page 1 of 1 (latest)
i think the way i initiate stripe is for old version right
Actually v3 is the correct version
Hmm, are you trying to call a node.js API in frontend js?
No problem, your backend is written in PHP right? you can select PHP tag in the doc and all example code will be in PHP.
ok ok
sorry, just a new jr develop whose senior just quit his job and leave everything to me xD
I see, if you are new to Stripe, I'll strongly recommend you to go through this tutorial https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements before the migration.
My shrift is over and my colleague will join this thread to help you soon!
Hi! Let me know if you have other questions.
It depends what you are trying to do. If it's for your backend code, then it should be the secret key (sk_xxx)
If it's for the frontend code (in JavaScript) then it should be the public key (pk_xxx)
got it
so what i did was
i make an intent from laravel backend
and then pass the payment intent to the blade
like this
am i doing it right
It's hard to tell exactly, you should try this code and see if there are errors.
But in general, you need to:
- Create the PaymentIntent on the backend
- Retrieve the client secret of the PaymentIntent on the frontend https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret
- And then use the Payment Element to collect the payment information