#zaelech_best-practices

1 messages ¡ Page 1 of 1 (latest)

olive tundraBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1217484379417219267

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

signal burrowBOT
proud sail
#

PaymentIntents are intended to be re-used like that. After a failed payment you can re-attempt the payment on that same intent.
One quick correction: a payment intent will not have a status of payment_failed , the status will simply go back to requires_payment_method. Though we do trigger a webhook event named payment_intent.payment_failed

ebon light
#

And how I can re-attempt the payment of this intent with the API ?

proud sail
#

You would just re-use the payment intents ID in another confirm call

#

This will work with any of our confirm calls

ebon light
#

I tried that :
$confirmPaymentIntent = \Stripe\PaymentIntent::confirm('pi_3OtrINEIMbi0WuJ613JblNB5', [
'payment_method' => 'pm_1OtrAdEIMbi0WuJ6z2ApvMxE',
]);

But I have this error
PHP Fatal error: Uncaught Error: Non-static method Stripe\PaymentIntent::confirm() cannot be called statically

What is wrong ?