pretix / pretix

Ticket shop application for conferences, festivals, concerts, tech events, shows, exhibitions, workshops, barcamps, etc.
https://pretix.eu
Other
1.87k stars 470 forks source link

Create a webhook event for manually moving an order to pending status #1174

Open Zambiorix opened 5 years ago

Zambiorix commented 5 years ago

When an order has been placed and paid.

No webhook is called to update the status to pending So, our own backend is not in sync with Pretix

If "Cancel the order" is selected in "what should happen to the order", the correct webhook is called.

raphaelm commented 5 years ago

You are right, there currently is no subscribable event when an order is going to status "pending" by a manual action. It would be easy enough to add something like this in pretix/api/webhooks.py, but we'd also need to check if there is a consistent log event being fired in every code path in which an order can become pending.

Zambiorix commented 5 years ago

So currently there is no way to guarantee an exact order sync with an external system?

Is this an objective for the near future?

raphaelm commented 5 years ago

Well, I'm all for adding a proper webhook for this status change, but no, it's not high on our roadmap right now.

"Guaranteed exact order sync" is certainly not an explicit objective or guarantee we ever made before or are planning to make, I can't even imagine how we'd want to ensure that, there's lots of things that can happen to orders. But yes, at least covering all status changes would be great.

Zambiorix commented 5 years ago

Well, best effort is good enough for me. With eventual consistency for our backend via Pretix API and scanning through the orders (every x hours or so)