#.borjasanchez

1 messages ยท Page 1 of 1 (latest)

pure furnaceBOT
inner mango
#

Hi

Well, once all the events arrive to my webhook is very confusing, I'm trying to debuging, but the code flow is bouncing randomly between events back and forth
Could you please share more details about this? why you can't debug your code ?

maiden wolf
#

Hi !

#

Well, my understanding is that when I created a checkout session a lot of events are created and send it to the webhook ...

#

But

#

Once the event enters in case "customer.subscription.created": ... in the middle of the proces jumps to another event ... like case "checkout.session.completed":

#

Both events need to coexist in the same call ... but ...

#

Is like everything is happening at the same time.

#

It is impossible to debug to check if the event is doing what it's supposed to do.

#

๐Ÿ˜ฌ

#

those events are just examples, it happens with every case I have...

inner mango
#

It is impossible to debug to check if the event is doing what it's supposed to do.
that 'll depends on your integration/framework

#

You can drop/focus on a single event type at once.

maiden wolf
#

how ?

inner mango
#

It depends on your integration how are you listening to events

#

so you can create an integration that listens only to checkout.session.completed

maiden wolf
#

A webhook per type of event ?

#

I'm using a switch right now with all the events

inner mango
#

yes, and what is the issue/thing preventing you from debuging you rintegration ?

maiden wolf
#

When I'm debuging and my debug line is in A, suddenly, jumps to B or C or somewhere else... and after that comes to A again... and after a couple of lines, jumps again to C, B, D, E etc....

inner mango
#

Create only one break point and follow it's flow.

maiden wolf
#

A, B, C are examples, there is no patterns.

maiden wolf
inner mango
#

Yes you need to focus on a single flow at once.

inner mango
maiden wolf
#

that's right, but I can't

maiden wolf
inner mango
maiden wolf
#

When I send a single event works fine ...

inner mango
maiden wolf
#

the problem is when several events happens at the same tieme (checkoutsession, subscription created, etc...)

inner mango
#

Did you try to re-send an event at once, so that you stay focused on only one event/flow ?

maiden wolf
#

No, let me try that

pure furnaceBOT
clever spire
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!