From ced0d40dd6c47fabf9b79643f9c23d8c3c80456e Mon Sep 17 00:00:00 2001 From: Eugene Date: Sat, 23 Oct 2021 16:11:04 +0200 Subject: [PATCH] various small fixes --- composer.json | 3 +++ config/whmcs.php | 2 +- src/Facades/{WhmcsApi.php => Whmcs.php} | 2 +- src/Whmcs.php | 2 +- src/WhmcsServiceProvider.php | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) rename src/Facades/{WhmcsApi.php => Whmcs.php} (85%) diff --git a/composer.json b/composer.json index 21a9af2..549d658 100644 --- a/composer.json +++ b/composer.json @@ -33,6 +33,9 @@ "providers": [ "FintechSystems\\Whmcs\\WhmcsServiceProvider" ] + }, + "aliases": { + "Whmcs": "FintechSystems\\Whmcs\\Facades\\Whmcs" } } } diff --git a/config/whmcs.php b/config/whmcs.php index b9eb7a5..64d4a2b 100644 --- a/config/whmcs.php +++ b/config/whmcs.php @@ -3,5 +3,5 @@ return [ 'url' => env('WHMCS_URL'), 'api_identifier' => env('WHMCS_API_IDENTIFIER'), - 'api_secret' => env('WHMCS_SECRET'), + 'api_secret' => env('WHMCS_API_SECRET'), ]; diff --git a/src/Facades/WhmcsApi.php b/src/Facades/Whmcs.php similarity index 85% rename from src/Facades/WhmcsApi.php rename to src/Facades/Whmcs.php index a30396f..8632bae 100644 --- a/src/Facades/WhmcsApi.php +++ b/src/Facades/Whmcs.php @@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Facade; -class WhmcsApi extends Facade +class Whmcs extends Facade { protected static function getFacadeAccessor() { diff --git a/src/Whmcs.php b/src/Whmcs.php index dfb440a..0a4af9e 100644 --- a/src/Whmcs.php +++ b/src/Whmcs.php @@ -11,7 +11,7 @@ class Whmcs implements BillingProvider private $api_secret; public function __construct($client) - { + { $this->url = $client['url']; $this->api_identifier = $client['api_identifier']; $this->api_secret = $client['api_secret']; diff --git a/src/WhmcsServiceProvider.php b/src/WhmcsServiceProvider.php index ab45589..e00b1e7 100644 --- a/src/WhmcsServiceProvider.php +++ b/src/WhmcsServiceProvider.php @@ -10,7 +10,7 @@ public function boot() { $this->publishes([ __DIR__.'/../config/whmcs.php' => config_path('whmcs.php'), - ]); + ], 'whmcs-config'); } public function register() @@ -19,7 +19,7 @@ public function register() __DIR__.'/../config/whmcs.php', 'whmcs' ); - $this->app->bind('whmcs-api', function () { + $this->app->bind('whmcs', function () { return new Whmcs([ 'url' => config('whmcs.url'), 'api_identifier' => config('whmcs.api_identifier'),