mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-03-06 16:01:29 +00:00
164 - Paying Promoters Directly
This commit is contained in:
@@ -33,7 +33,7 @@ class ConcertOrdersController extends Controller
|
||||
|
||||
try {
|
||||
$reservation = $concert->reserveTickets(request('ticket_quantity'), request('email'));
|
||||
$order = $reservation->complete($this->paymentGateway, request('payment_token'));
|
||||
$order = $reservation->complete($this->paymentGateway, request('payment_token'), $concert->user->stripe_account_id);
|
||||
|
||||
Mail::to($order->email)->send(new OrderConfirmationEmail($order));
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ class Reservation
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
public function complete($paymentGateway, $paymentToken)
|
||||
public function complete($paymentGateway, $paymentToken, $destinationAccountId)
|
||||
{
|
||||
$charge = $paymentGateway->charge($this->totalCost(), $paymentToken);
|
||||
$charge = $paymentGateway->charge($this->totalCost(), $paymentToken, $destinationAccountId);
|
||||
|
||||
return Order::forTickets($this->tickets(), $this->email(), $charge);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user