#dack_bonjour-webhook-handler

1 messages ยท Page 1 of 1 (latest)

hidden socket
#

Hi there ๐Ÿ‘‹ just want to make sure I'm understanding your scenario correctly. Within your webhook event handler code you're making a curl request to an API, and that curl request is timing out?

chilly zealot
#

yep that's it ๐Ÿ™‚

#

the thing is that it is timing out only on the webhook event handler code

#

If for example i place the code outside this file, that contains the webhook handler code, it works perfectly. I've already checked all the params send to the api and everything is good

#

i'm triggering the event like this:

stripe trigger payment_intent.succeeded --add payment_intent:metadata['invoice_id']=10 --add payment_intent:metadata['user_id']=1

#

(by adding two metada values)

hidden socket
#

Sorry, I'm not sure what the cause of that could be then. It sounds like something is different with your environment or flow when you make that request from your event handler. I'd recommend trying to debug the request inside of the block (rather than the CLI triggering the event) to see what is happening to that request.

chilly zealot
#

found...my bad ๐Ÿ˜„

I was running "php -S" on same 8080 of apache and it was creating some conflicts...now it works, thanks! ๐Ÿ™‚

hidden socket
#

Nice catch! Glad you got it working.

chilly zealot
#

I've just another question...i've to choose one event in order to know when the product has been paid (so payment succeeded)

do you think that payment_intent.succeeded could be the right one ?

#

(it's not a recurring payment, it's a one time payment)

hidden socket
#

As long as you're using payment intents, then yes that is a good choice.

chilly zealot
#

Perfect, thanks again ๐Ÿ™‚

hidden socket
#

Any time!