mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
49 - Moving the Email to the Reservation
This commit is contained in:
@@ -31,13 +31,13 @@ class ConcertOrdersController extends Controller
|
||||
|
||||
try {
|
||||
// Find some tickets
|
||||
$reservation = $concert->reserveTickets(request('ticket_quantity'));
|
||||
$reservation = $concert->reserveTickets(request('ticket_quantity'), request('email'));
|
||||
|
||||
// Charge the customer for the tickets
|
||||
$this->paymentGateway->charge($reservation->totalCost(), request('payment_token'));
|
||||
|
||||
// Create an order for those tickets
|
||||
$order = Order::forTickets($reservation->tickets(), request('email'), $reservation->totalCost());
|
||||
$order = Order::forTickets($reservation->tickets(), $reservation->email(), $reservation->totalCost());
|
||||
|
||||
return response()->json($order, 201);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user