From e5e6fd547a6a3b8e18b2577912016c8516d6dbe0 Mon Sep 17 00:00:00 2001 From: Sang Nguyen Date: Sun, 24 Nov 2024 07:08:09 +0700 Subject: [PATCH] Update PhonePeServiceProvider.php --- src/Providers/PhonePeServiceProvider.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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()