#laji_stripe
1 messages · Page 1 of 1 (latest)
After generating _payment_element through client_secret, there is one record in the stripe payment background, and another record after the payment is successful?
react
client_secret by PHP
would you mind sharing your Payment Intent ID?
the Payment Intent ID pi_xxxx
pi_3NpofiLL4ALOXD231j7JnOSm
I haven't paid yet
After my payment is successful, there will be another record on the platform.
let me take a look
Do I have to pay now?
please hold on for a second
okk
yes would you mind to pay it?
ok
pi_3NpoNVLL4ALOXD230mIbpTc1
My payment was completed and a new ID was generated.
what are you doing in your webhook endpoint code?
how are you integrating with Stripe?
The unfinished ones are created when loading the stripe form. After the payment is successful, the first item
would you mind sharing your code?
both please
give me a minute to take a look
help me
I'm reading your code, please be patient
ok so basically what you're doing here is not the recommended path https://stripe.com/docs/payments/quickstart
you're creating a Payment Intent in the backend and sending the client_secret
then instead of using that to stripe.confirmPayment you're creating a Payment Method (stripe.createPaymentMethod) and sending that PaymentMethod to your PaymentMethodOnCart which then I presume that calls your backend and creates another PaymentIntent
Can this replace the client_secret on the backend?
yes you can choose the https://stripe.com/docs/payments/accept-a-payment-deferred integration path
Mine is web react
I came based on this, return the clientSecret to the front end, and then generate the payment form
This page case is too simple and has no interaction with the backend
no stripe.createPaymentMethod in the demo
yes the quickstart doesn't use the deferred flow(it's new and not all docs are fully updated). You can follow the code at https://stripe.com/docs/payments/accept-a-payment-deferred instead.
I read this document and later requested the backend to return client_secret. At this time, a record was generated on the payment platform. But after the payment is successful, there will be a new record
what do you call a "payment record"? do you have examples of this happening?
sounds like a bug in your implementation if you are creating+confirming more PaymentIntents than are needed.