hasgeek / boxoffice

Ticketing
GNU Affero General Public License v3.0
10 stars 5 forks source link

Attempt to re-process an order #128

Open shreyas-satish opened 7 years ago

shreyas-satish commented 7 years ago

There are cases where a user makes a payment, but can't see the order through to completion due to multiple reasons (the server may have gone down, or the payment gateway might be down). The admin interface should provide an option to re-process an order.

Re-processing an order would involve the following steps:

  1. Verify and capture payment.
  2. If payment is successfully captured, the order is confirmed and the ticket is mailed to the user.
shreyas-satish commented 7 years ago

On further thought, this process should be completely automated. Razorpay supports webhooks, for certain events eg: when a payment is authorized.

Boxoffice needs to expose an endpoint which can listen to Razorpay's webhook, and trigger a background job for every authorized payment. The background job will essentially check if the authorized payment was captured (with a delay of, say, 10 minutes), and if it wasn't, will attempt a re-capture.