diff --git a/src/Providers/PhonePeServiceProvider.php b/src/Providers/PhonePeServiceProvider.php index 83b00d7..1a9d020 100644 --- a/src/Providers/PhonePeServiceProvider.php +++ b/src/Providers/PhonePeServiceProvider.php @@ -21,6 +21,10 @@ class PhonePeServiceProvider extends ServiceProvider public function register(): void { + if (! is_plugin_active('payment')) { + return; + } + $this->app->bind(PhonePePaymentClient::class, function () { return new PhonePePaymentClient( new \FriendsOfBotble\PhonePe\PhonePe\payments\v1\PhonePePaymentClient( @@ -38,6 +42,10 @@ public function register(): void public function boot(): void { + if (! is_plugin_active('payment')) { + return; + } + $this ->setNamespace('plugins/fob-phonepe') ->loadAndPublishViews()