From 631527e8e3a0bfd688a721aa1a13fda1be2716fe Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 29 Feb 2024 19:58:59 +1100 Subject: [PATCH] Fixes for redirect after stripe connect --- app/Http/Controllers/StripeConnectController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/StripeConnectController.php b/app/Http/Controllers/StripeConnectController.php index a8de13091b..e28eb61d85 100644 --- a/app/Http/Controllers/StripeConnectController.php +++ b/app/Http/Controllers/StripeConnectController.php @@ -54,6 +54,8 @@ class StripeConnectController extends BaseController $redirect_uri = config('ninja.app_url').'/stripe/completed'; $endpoint = "https://connect.stripe.com/oauth/authorize?response_type=code&client_id={$stripe_client_id}&redirect_uri={$redirect_uri}&scope=read_write&state={$token}"; + \Illuminate\Support\Facades\Cache::pull($token); + return redirect($endpoint); } @@ -148,7 +150,8 @@ class StripeConnectController extends BaseController } //response here - return view('auth.connect.completed', ['url' => $redirect_uri]); + // return view('auth.connect.completed', ['url' => $redirect_uri]); + return redirect($redirect_uri); } }