mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
85 - Storing Charge Details with Orders
This commit is contained in:
@@ -9,12 +9,13 @@ class Order extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
public static function forTickets($tickets, $email, $amount)
|
||||
public static function forTickets($tickets, $email, $charge)
|
||||
{
|
||||
$order = self::create([
|
||||
'confirmation_number' => OrderConfirmationNumber::generate(),
|
||||
'email' => $email,
|
||||
'amount' => $amount,
|
||||
'amount' => $charge->amount(),
|
||||
'card_last_four' => $charge->cardLastFour(),
|
||||
]);
|
||||
|
||||
$order->tickets()->saveMany($tickets);
|
||||
|
||||
Reference in New Issue
Block a user