mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
3.5 - Cancelling Failed Orders
This commit is contained in:
@@ -32,6 +32,7 @@ class ConcertOrdersController extends Controller
|
||||
$this->paymentGateway->charge(request('ticket_quantity') * $concert->ticket_price, request('payment_token'));
|
||||
return response()->json([], 201);
|
||||
} catch (PaymentFailedException $e) {
|
||||
$order->cancel();
|
||||
return response()->json([], 422);
|
||||
} catch (NotEnoughTicketsException $e) {
|
||||
return response()->json([], 422);
|
||||
|
||||
Reference in New Issue
Block a user