From 922c3c80b1385d8e56050e8be95287be53b5a61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Sun, 14 Jan 2024 09:34:37 +0100 Subject: [PATCH] wip --- config/bazar_stripe.php | 4 ++-- src/StripeDriver.php | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/bazar_stripe.php b/config/bazar_stripe.php index a86f9f7..dff6a7b 100644 --- a/config/bazar_stripe.php +++ b/config/bazar_stripe.php @@ -8,8 +8,8 @@ 'secret' => env('STRIPE_SECRET'), - 'success_url' => env('STRIPE_SUCCESS_URL', '/'), + 'success_url' => env('STRIPE_SUCCESS_URL', '/?session_id={CHECKOUT_SESSION_ID}'), - 'failure_url' => env('STRIPE_FAILURE_URL', '/'), + 'failure_url' => env('STRIPE_FAILURE_URL', '/?session_id={CHECKOUT_SESSION_ID}'), ]; diff --git a/src/StripeDriver.php b/src/StripeDriver.php index 2bd3630..6d826ad 100644 --- a/src/StripeDriver.php +++ b/src/StripeDriver.php @@ -25,6 +25,9 @@ class StripeDriver extends Driver */ public readonly StripeClient $client; + /** + * The Stripe session instance. + */ protected ?Session $session = null; /** @@ -52,7 +55,7 @@ public function getCaptureUrl(Order $order): string { return URL::route('bazar.gateway.capture', [ 'driver' => $this->name, - ]).'&session_id={CHECKOUT_SESSION_ID}'; + ]).'?session_id={CHECKOUT_SESSION_ID}'; } /**