order = $order; } public function getOrderId() { return $this->order->id; } public function getTransactionReference() { return request('reference'); } public function toArray() { return [ 'key' => setting('paystack_public_key'), 'email' => $this->order->customer_email, 'amount' => $this->order->total->convertToCurrentCurrency()->subunit(), 'ref' => 'ref' . time(), 'currency' => currency(), 'order_id' => $this->order->id, ]; } }