@@ -73,7 +73,7 @@ |
||
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | 75 | * Get the services provided by the provider |
| 76 | - * @return array |
|
| 76 | + * @return string[] |
|
| 77 | 77 | */ |
| 78 | 78 | public function provides() |
| 79 | 79 | { |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | { |
| 65 | 65 | $this->bootstrapConfig(); |
| 66 | 66 | |
| 67 | - $this->app->singleton('laravel-paystack', function ($app) { |
|
| 67 | + $this->app->singleton('laravel-paystack', function($app) { |
|
| 68 | 68 | |
| 69 | 69 | return new Paystack($this->client); |
| 70 | 70 | |
@@ -72,9 +72,9 @@ discard block |
||
| 72 | 72 | * when the payload is built on the fly (not passed to the controller from a view) |
| 73 | 73 | * @return Paystack |
| 74 | 74 | */ |
| 75 | - public function makePaymentRequest( $data = null) |
|
| 75 | + public function makePaymentRequest($data = null) |
|
| 76 | 76 | { |
| 77 | - if ( $data == null ) { |
|
| 77 | + if ($data == null) { |
|
| 78 | 78 | $data = [ |
| 79 | 79 | "amount" => intval(request()->amount), |
| 80 | 80 | "reference" => request()->reference, |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | $this->response = $this->client->{strtolower($method)}( |
| 126 | - $this->baseUrl . $relativeUrl, |
|
| 126 | + $this->baseUrl.$relativeUrl, |
|
| 127 | 127 | ["body" => json_encode($body)] |
| 128 | 128 | ); |
| 129 | 129 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | $relativeUrl = "/transaction/verify/{$transactionRef}"; |
| 169 | 169 | |
| 170 | - $this->response = $this->client->get($this->baseUrl . $relativeUrl, []); |
|
| 170 | + $this->response = $this->client->get($this->baseUrl.$relativeUrl, []); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | public function fetchPlan($plan_code) |
| 316 | 316 | { |
| 317 | 317 | $this->setRequestOptions(); |
| 318 | - return $this->setHttpResponse('/plan/' . $plan_code, 'GET', [])->getResponse(); |
|
| 318 | + return $this->setHttpResponse('/plan/'.$plan_code, 'GET', [])->getResponse(); |
|
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | /** |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | ]; |
| 337 | 337 | |
| 338 | 338 | $this->setRequestOptions(); |
| 339 | - return $this->setHttpResponse('/plan/' . $plan_code, 'PUT', $data)->getResponse(); |
|
| 339 | + return $this->setHttpResponse('/plan/'.$plan_code, 'PUT', $data)->getResponse(); |
|
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | /** |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | public function fetchCustomer($customer_id) |
| 366 | 366 | { |
| 367 | 367 | $this->setRequestOptions(); |
| 368 | - return $this->setHttpResponse('/customer/'. $customer_id, 'GET', [])->getResponse(); |
|
| 368 | + return $this->setHttpResponse('/customer/'.$customer_id, 'GET', [])->getResponse(); |
|
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | /** |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | ]; |
| 386 | 386 | |
| 387 | 387 | $this->setRequestOptions(); |
| 388 | - return $this->setHttpResponse('/customer/'. $customer_id, 'PUT', $data)->getResponse(); |
|
| 388 | + return $this->setHttpResponse('/customer/'.$customer_id, 'PUT', $data)->getResponse(); |
|
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | /** |
@@ -441,7 +441,7 @@ discard block |
||
| 441 | 441 | { |
| 442 | 442 | $this->setRequestOptions(); |
| 443 | 443 | |
| 444 | - return $this->setHttpResponse('/subscription?customer=' . $customer_id, 'GET', [])->getData(); |
|
| 444 | + return $this->setHttpResponse('/subscription?customer='.$customer_id, 'GET', [])->getData(); |
|
| 445 | 445 | } |
| 446 | 446 | |
| 447 | 447 | /** |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | { |
| 455 | 455 | $this->setRequestOptions(); |
| 456 | 456 | |
| 457 | - return $this->setHttpResponse('/subscription?plan=' . $plan_id, 'GET', [])->getData(); |
|
| 457 | + return $this->setHttpResponse('/subscription?plan='.$plan_id, 'GET', [])->getData(); |
|
| 458 | 458 | } |
| 459 | 459 | |
| 460 | 460 | /** |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | * @return array |
| 558 | 558 | */ |
| 559 | 559 | |
| 560 | - public function createSubAccount(){ |
|
| 560 | + public function createSubAccount() { |
|
| 561 | 561 | $data = [ |
| 562 | 562 | "business_name" => request()->business_name, |
| 563 | 563 | "settlement_bank" => request()->settlement_bank, |
@@ -580,10 +580,10 @@ discard block |
||
| 580 | 580 | * @param subaccount code |
| 581 | 581 | * @return array |
| 582 | 582 | */ |
| 583 | - public function fetchSubAccount($subaccount_code){ |
|
| 583 | + public function fetchSubAccount($subaccount_code) { |
|
| 584 | 584 | |
| 585 | 585 | $this->setRequestOptions(); |
| 586 | - return $this->setHttpResponse("/subaccount/{$subaccount_code}","GET",[])->getResponse(); |
|
| 586 | + return $this->setHttpResponse("/subaccount/{$subaccount_code}", "GET", [])->getResponse(); |
|
| 587 | 587 | |
| 588 | 588 | } |
| 589 | 589 | |
@@ -592,10 +592,10 @@ discard block |
||
| 592 | 592 | * @param $per_page - Specifies how many records to retrieve per page , $page - SPecifies exactly what page to retrieve |
| 593 | 593 | * @return array |
| 594 | 594 | */ |
| 595 | - public function listSubAccounts($per_page,$page){ |
|
| 595 | + public function listSubAccounts($per_page, $page) { |
|
| 596 | 596 | |
| 597 | 597 | $this->setRequestOptions(); |
| 598 | - return $this->setHttpResponse("/subaccount/?perPage=".(int) $per_page."&page=".(int) $page,"GET")->getResponse(); |
|
| 598 | + return $this->setHttpResponse("/subaccount/?perPage=".(int) $per_page."&page=".(int) $page, "GET")->getResponse(); |
|
| 599 | 599 | |
| 600 | 600 | } |
| 601 | 601 | |
@@ -606,7 +606,7 @@ discard block |
||
| 606 | 606 | * @return array |
| 607 | 607 | */ |
| 608 | 608 | |
| 609 | - public function updateSubAccount($subaccount_code){ |
|
| 609 | + public function updateSubAccount($subaccount_code) { |
|
| 610 | 610 | $data = [ |
| 611 | 611 | "business_name" => request()->business_name, |
| 612 | 612 | "settlement_bank" => request()->settlement_bank, |