diff --git a/BitCart.php b/BitCart.php index c19a0dc..d592962 100644 --- a/BitCart.php +++ b/BitCart.php @@ -11,6 +11,11 @@ use Illuminate\Http\Request; class BitCart extends Gateway { + + public function boot() + { + require __DIR__ . '/routes.php'; + } /** * Get the extension metadata * @@ -60,11 +65,13 @@ class BitCart extends Gateway * * @param int $total * @param array $products + * @param Invoice $invoice * @param int $invoiceId * @return string */ - public function pay($total, $products, $invoiceId) + public function pay(Invoice $invoice, $total) { + $invoiceId = $invoice->id; $payment_url = $this->get_payment_url($invoiceId,$total); return $payment_url; } diff --git a/routes.php b/routes.php index 28acaf9..1f8c4c5 100644 --- a/routes.php +++ b/routes.php @@ -1,5 +1,6 @@ name('extensions.gateways.bitcart.webhook');