85 - Storing Charge Details with Orders

This commit is contained in:
Adam Wathan
2017-03-17 12:53:42 -04:00
parent 8c8d05a353
commit 44db85bdb0
3 changed files with 11 additions and 9 deletions

View File

@@ -30,9 +30,9 @@ class Reservation
public function complete($paymentGateway, $paymentToken)
{
$paymentGateway->charge($this->totalCost(), $paymentToken);
$charge = $paymentGateway->charge($this->totalCost(), $paymentToken);
return Order::forTickets($this->tickets(), $this->email(), $this->totalCost());
return Order::forTickets($this->tickets(), $this->email(), $charge);
}
public function cancel()