Skip to content

Commit

Permalink
Update PhonePeServiceProvider.php
Browse files Browse the repository at this point in the history
  • Loading branch information
sangnguyenplus authored Nov 24, 2024
1 parent 04a5636 commit e5e6fd5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Providers/PhonePeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -38,6 +42,10 @@ public function register(): void

public function boot(): void
{
if (! is_plugin_active('payment')) {
return;
}

$this
->setNamespace('plugins/fob-phonepe')
->loadAndPublishViews()
Expand Down

0 comments on commit e5e6fd5

Please sign in to comment.