- Updated order process so order session is cleared before we queue jobs. Prevents double orders in some cases.

This commit is contained in:
Dave 2016-03-21 16:39:36 +00:00
parent 8668b580d2
commit c94c91d18d
1 changed files with 7 additions and 9 deletions

View File

@ -524,21 +524,19 @@ class EventCheckoutController extends Controller
}
}
/*
* Queue up some tasks - Emails to be sent, PDFs etc.
*/
$this->dispatch(new OrderTicketsCommand($order));
/*
* Release the reserved the tickets
*/
ReservedTickets::where('session_id', '=', session()->getId())->delete();
/*
* Kill the session
*/
session()->forget('ticket_order_'.$event->id);
/*
* Queue up some tasks - Emails to be sent, PDFs etc.
*/
$this->dispatch(new OrderTicketsCommand($order));
if($return_json) {
return response()->json([
'status' => 'success',