@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public function makePaymentRequest($data = null) |
| 71 | 71 | { |
| 72 | - if ( $data == null ) { |
|
| 72 | + if ($data == null) { |
|
| 73 | 73 | $data = [ |
| 74 | 74 | "amount" => intval(request()->amount), |
| 75 | 75 | "reference" => request()->reference, |
@@ -5,31 +5,31 @@ |
||
| 5 | 5 | |
| 6 | 6 | class Endpoint |
| 7 | 7 | { |
| 8 | - const INIT_TRANSACTION = "/transaction/initialize"; |
|
| 9 | - const VERIFY_TRANSACTION = "/transaction/verify/"; |
|
| 10 | - const EXPORT_TRANSACTION = "/transaction/export"; |
|
| 11 | - const TRANSACTIONS = "/transaction"; |
|
| 12 | - const PLANS = "/plan"; |
|
| 13 | - const CREATE_PLAN = "/plan"; |
|
| 14 | - const FETCH_PLAN = "/plan/"; |
|
| 15 | - const UPDATE_PLAN = "/plan/"; |
|
| 16 | - const CUSTOMERS = "/customer"; |
|
| 17 | - const CREATE_CUSTOMER = "/customer"; |
|
| 18 | - const FETCH_CUSTOMER = "/customer/"; |
|
| 19 | - const UPDATE_CUSTOMER = "/customer/"; |
|
| 20 | - const GET_ALL_SUBSCRIPTIONS = "/subscription"; |
|
| 21 | - const CREATE_SUBSCRIPTION = "/subscription"; |
|
| 22 | - const GET_CUSTOMER_SUBSCRIPTION = "/subscription?customer="; |
|
| 23 | - const GET_PLAN_SUBSCRIPTION = "/subscription?plan="; |
|
| 24 | - const ENABLE_SUBSCRIPTION = "/subscription/enable"; |
|
| 25 | - const DISABLE_SUBSCRIPTION = "/subscription/disable"; |
|
| 26 | - const FETCH_SUBSCRIPTION = "/subscription/"; |
|
| 27 | - const CREATE_PAGE = "/page"; |
|
| 28 | - const GET_ALL_PAGES = "/page"; |
|
| 29 | - const FETCH_PAGE = "/page/"; |
|
| 30 | - const UPDATE_PAGE = "/page/"; |
|
| 31 | - const CREATE_SUB_ACCOUNT = "/subaccount"; |
|
| 32 | - const FETCH_SUB_ACCOUNT = "/subaccount/"; |
|
| 33 | - const LIST_SUB_ACCOUNT = "/subaccount/?perPage="; |
|
| 34 | - const UPDATE_SUB_ACCOUNT = "/subaccount/?perPage="; |
|
| 8 | + const INIT_TRANSACTION = "/transaction/initialize"; |
|
| 9 | + const VERIFY_TRANSACTION = "/transaction/verify/"; |
|
| 10 | + const EXPORT_TRANSACTION = "/transaction/export"; |
|
| 11 | + const TRANSACTIONS = "/transaction"; |
|
| 12 | + const PLANS = "/plan"; |
|
| 13 | + const CREATE_PLAN = "/plan"; |
|
| 14 | + const FETCH_PLAN = "/plan/"; |
|
| 15 | + const UPDATE_PLAN = "/plan/"; |
|
| 16 | + const CUSTOMERS = "/customer"; |
|
| 17 | + const CREATE_CUSTOMER = "/customer"; |
|
| 18 | + const FETCH_CUSTOMER = "/customer/"; |
|
| 19 | + const UPDATE_CUSTOMER = "/customer/"; |
|
| 20 | + const GET_ALL_SUBSCRIPTIONS = "/subscription"; |
|
| 21 | + const CREATE_SUBSCRIPTION = "/subscription"; |
|
| 22 | + const GET_CUSTOMER_SUBSCRIPTION = "/subscription?customer="; |
|
| 23 | + const GET_PLAN_SUBSCRIPTION = "/subscription?plan="; |
|
| 24 | + const ENABLE_SUBSCRIPTION = "/subscription/enable"; |
|
| 25 | + const DISABLE_SUBSCRIPTION = "/subscription/disable"; |
|
| 26 | + const FETCH_SUBSCRIPTION = "/subscription/"; |
|
| 27 | + const CREATE_PAGE = "/page"; |
|
| 28 | + const GET_ALL_PAGES = "/page"; |
|
| 29 | + const FETCH_PAGE = "/page/"; |
|
| 30 | + const UPDATE_PAGE = "/page/"; |
|
| 31 | + const CREATE_SUB_ACCOUNT = "/subaccount"; |
|
| 32 | + const FETCH_SUB_ACCOUNT = "/subaccount/"; |
|
| 33 | + const LIST_SUB_ACCOUNT = "/subaccount/?perPage="; |
|
| 34 | + const UPDATE_SUB_ACCOUNT = "/subaccount/?perPage="; |
|
| 35 | 35 | } |
| 36 | 36 | \ No newline at end of file |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | $builder = new ClientBuilder(); |
| 93 | 93 | |
| 94 | 94 | if ($this->cache && class_exists(CacheItemPool::class) && $cache = array_get($config, 'cache')) { |
| 95 | - $builder->addCache(new CacheItemPool($this->cache->store( $cache === true ? null : $cache))); |
|
| 95 | + $builder->addCache(new CacheItemPool($this->cache->store($cache === true ? null : $cache))); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | return $builder; |
@@ -30,8 +30,8 @@ discard block |
||
| 30 | 30 | protected $defer = false; |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | - * Publishes all the config file this package needs to function |
|
| 34 | - */ |
|
| 33 | + * Publishes all the config file this package needs to function |
|
| 34 | + */ |
|
| 35 | 35 | public function boot() |
| 36 | 36 | { |
| 37 | 37 | $this->setupConfig(); |
@@ -56,8 +56,8 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | - * Register the application services. |
|
| 60 | - */ |
|
| 59 | + * Register the application services. |
|
| 60 | + */ |
|
| 61 | 61 | public function register() |
| 62 | 62 | { |
| 63 | 63 | $this->app->bind('laravel-paystack', function () { |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
| 128 | - * Get the services provided by the provider |
|
| 129 | - * @return array |
|
| 130 | - */ |
|
| 128 | + * Get the services provided by the provider |
|
| 129 | + * @return array |
|
| 130 | + */ |
|
| 131 | 131 | public function provides() |
| 132 | 132 | { |
| 133 | 133 | return [ |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function register() |
| 62 | 62 | { |
| 63 | - $this->app->bind('laravel-paystack', function () { |
|
| 63 | + $this->app->bind('laravel-paystack', function() { |
|
| 64 | 64 | return new Paystack; |
| 65 | 65 | }); |
| 66 | 66 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | protected function registerPaystackFactory() |
| 78 | 78 | { |
| 79 | - $this->app->singleton('paystack.factory', function (Container $container) { |
|
| 79 | + $this->app->singleton('paystack.factory', function(Container $container) { |
|
| 80 | 80 | $cache = $container['cache']; |
| 81 | 81 | |
| 82 | 82 | return new PaystackFactory($cache); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | protected function registerPaystackManager() |
| 96 | 96 | { |
| 97 | - $this->app->singleton('paystack', function (Container $container) { |
|
| 97 | + $this->app->singleton('paystack', function(Container $container) { |
|
| 98 | 98 | $config = $container['config']; |
| 99 | 99 | $factory = $container['paystack.factory']; |
| 100 | 100 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | protected function registerCoreBindings() |
| 115 | 115 | { |
| 116 | - $this->app->bind('paystack.connection', function (Container $container) { |
|
| 116 | + $this->app->bind('paystack.connection', function(Container $container) { |
|
| 117 | 117 | $manager = $container['paystack']; |
| 118 | 118 | |
| 119 | 119 | return $manager->connection(); |