diff --git a/src/LunarApiStripeAdapterServiceProvider.php b/src/LunarApiStripeAdapterServiceProvider.php index aebb7ff..2ea73f7 100644 --- a/src/LunarApiStripeAdapterServiceProvider.php +++ b/src/LunarApiStripeAdapterServiceProvider.php @@ -23,11 +23,6 @@ public function register(): void */ public function boot(): void { - $this->app->singleton( - 'gc:stripe', - fn (Application $app) => $app->make(StripeManager::class), - ); - $this->loadRoutesFrom(__DIR__.'/../routes/webhooks.php'); StripePaymentAdapter::register(); @@ -41,5 +36,13 @@ public function boot(): void __DIR__.'/../config/stripe-webhooks.php' => config_path('stripe-webhooks.php'), ], 'lunar-api.stripe.config'); } + + // Testing + if ($this->app->environment('testing')) { + $this->app->singleton( + 'gc:stripe', + fn (Application $app) => $app->make(StripeManager::class), + ); + } } }