@@ -59,10 +59,10 @@ |
||
| 59 | 59 | public function generateReference(string $transactionPrefix = null): string |
| 60 | 60 | { |
| 61 | 61 | if ($transactionPrefix) { |
| 62 | - return $transactionPrefix.'_'.uniqid(time()); |
|
| 62 | + return $transactionPrefix . '_' . uniqid(time()); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - return 'PK_'.uniqid(time()); |
|
| 65 | + return 'PK_' . uniqid(time()); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | * |
| 12 | 12 | * @link https://paystack.com/docs/api/#page-list |
| 13 | 13 | */ |
| 14 | - public function list(array $query = []): self |
|
| 14 | + public function list(array $query = [ ]): self |
|
| 15 | 15 | { |
| 16 | 16 | $this->get($this->url(self::ENDPOINT), $query); |
| 17 | 17 | |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @link https://paystack.com/docs/api/#settlement-fetch |
| 25 | 25 | */ |
| 26 | - public function fetch(string $settlement_id, array $query = []): self |
|
| 26 | + public function fetch(string $settlement_id, array $query = [ ]): self |
|
| 27 | 27 | { |
| 28 | - $this->get($this->url(self::ENDPOINT).'/'.$settlement_id.'/transactions', $query); |
|
| 28 | + $this->get($this->url(self::ENDPOINT) . '/' . $settlement_id . '/transactions', $query); |
|
| 29 | 29 | |
| 30 | 30 | return $this; |
| 31 | 31 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @link https://paystack.com/docs/api/#customer-list |
| 25 | 25 | */ |
| 26 | - public function list(array $query = []): self |
|
| 26 | + public function list(array $query = [ ]): self |
|
| 27 | 27 | { |
| 28 | 28 | $this->get($this->url(self::ENDPOINT), $query); |
| 29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function fetch(string $customer_email): self |
| 39 | 39 | { |
| 40 | - $this->get($this->url(self::ENDPOINT).'/'.$customer_email); |
|
| 40 | + $this->get($this->url(self::ENDPOINT) . '/' . $customer_email); |
|
| 41 | 41 | |
| 42 | 42 | return $this; |
| 43 | 43 | } |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | * |
| 48 | 48 | * @link https://paystack.com/docs/api/#customer-update |
| 49 | 49 | */ |
| 50 | - public function update(string $customer_code, array $payload = []): self |
|
| 50 | + public function update(string $customer_code, array $payload = [ ]): self |
|
| 51 | 51 | { |
| 52 | - $this->put($this->url(self::ENDPOINT).'/'.$customer_code, $payload); |
|
| 52 | + $this->put($this->url(self::ENDPOINT) . '/' . $customer_code, $payload); |
|
| 53 | 53 | |
| 54 | 54 | return $this; |
| 55 | 55 | } |
@@ -59,9 +59,9 @@ discard block |
||
| 59 | 59 | * |
| 60 | 60 | * @link https://paystack.com/docs/api/#customer-validate |
| 61 | 61 | */ |
| 62 | - public function validate(string $customer_code, array $payload = []): self |
|
| 62 | + public function validate(string $customer_code, array $payload = [ ]): self |
|
| 63 | 63 | { |
| 64 | - $this->post($this->url(self::ENDPOINT).'/'.$customer_code.'/identification', $payload); |
|
| 64 | + $this->post($this->url(self::ENDPOINT) . '/' . $customer_code . '/identification', $payload); |
|
| 65 | 65 | |
| 66 | 66 | return $this; |
| 67 | 67 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function whitelist(array $payload): self |
| 75 | 75 | { |
| 76 | - $this->post($this->url(self::ENDPOINT).'/set_risk_action', $payload); |
|
| 76 | + $this->post($this->url(self::ENDPOINT) . '/set_risk_action', $payload); |
|
| 77 | 77 | |
| 78 | 78 | return $this; |
| 79 | 79 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function deactivateAuthorization(array $payload): self |
| 87 | 87 | { |
| 88 | - $this->post($this->url(self::ENDPOINT).'/deactivate_authorization', $payload); |
|
| 88 | + $this->post($this->url(self::ENDPOINT) . '/deactivate_authorization', $payload); |
|
| 89 | 89 | |
| 90 | 90 | return $this; |
| 91 | 91 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @link https://paystack.com/docs/api/#split-list |
| 25 | 25 | */ |
| 26 | - public function list(array $query = []): self |
|
| 26 | + public function list(array $query = [ ]): self |
|
| 27 | 27 | { |
| 28 | 28 | $this->get($this->url(self::ENDPOINT), $query); |
| 29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function fetch(string $split_id): self |
| 39 | 39 | { |
| 40 | - $this->get($this->url(self::ENDPOINT).'/'.$split_id); |
|
| 40 | + $this->get($this->url(self::ENDPOINT) . '/' . $split_id); |
|
| 41 | 41 | |
| 42 | 42 | return $this; |
| 43 | 43 | } |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | * |
| 48 | 48 | * @link https://paystack.com/docs/api/#split-update |
| 49 | 49 | */ |
| 50 | - public function update(string $split_id, array $payload = []): self |
|
| 50 | + public function update(string $split_id, array $payload = [ ]): self |
|
| 51 | 51 | { |
| 52 | - $this->put($this->url(self::ENDPOINT).'/'.$split_id, $payload); |
|
| 52 | + $this->put($this->url(self::ENDPOINT) . '/' . $split_id, $payload); |
|
| 53 | 53 | |
| 54 | 54 | return $this; |
| 55 | 55 | } |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @link https://paystack.com/docs/api/#split-add-subaccount |
| 62 | 62 | */ |
| 63 | - public function addSubaccount(string $split_id, array $payload = []): self |
|
| 63 | + public function addSubaccount(string $split_id, array $payload = [ ]): self |
|
| 64 | 64 | { |
| 65 | - $this->post($this->url(self::ENDPOINT).'/'.$split_id.'/subaccount/add', $payload); |
|
| 65 | + $this->post($this->url(self::ENDPOINT) . '/' . $split_id . '/subaccount/add', $payload); |
|
| 66 | 66 | |
| 67 | 67 | return $this; |
| 68 | 68 | } |
@@ -72,9 +72,9 @@ discard block |
||
| 72 | 72 | * |
| 73 | 73 | * @link https://paystack.com/docs/api/#split-remove-subaccount |
| 74 | 74 | */ |
| 75 | - public function removeSubaccount(string $split_id, array $payload = []): self |
|
| 75 | + public function removeSubaccount(string $split_id, array $payload = [ ]): self |
|
| 76 | 76 | { |
| 77 | - $this->post($this->url(self::ENDPOINT).'/'.$split_id.'/subaccount/remove', $payload); |
|
| 77 | + $this->post($this->url(self::ENDPOINT) . '/' . $split_id . '/subaccount/remove', $payload); |
|
| 78 | 78 | |
| 79 | 79 | return $this; |
| 80 | 80 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function finalize(array $payload): self |
| 27 | 27 | { |
| 28 | - $this->post($this->url(self::ENDPOINT).'/finalize_transfer', $payload); |
|
| 28 | + $this->post($this->url(self::ENDPOINT) . '/finalize_transfer', $payload); |
|
| 29 | 29 | |
| 30 | 30 | return $this; |
| 31 | 31 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function bulk(array $payload): self |
| 39 | 39 | { |
| 40 | - $this->post($this->url(self::ENDPOINT).'/bulk', $payload); |
|
| 40 | + $this->post($this->url(self::ENDPOINT) . '/bulk', $payload); |
|
| 41 | 41 | |
| 42 | 42 | return $this; |
| 43 | 43 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * |
| 48 | 48 | * @link https://paystack.com/docs/api/#transfer-list |
| 49 | 49 | */ |
| 50 | - public function list(array $query = []): self |
|
| 50 | + public function list(array $query = [ ]): self |
|
| 51 | 51 | { |
| 52 | 52 | $this->get($this->url(self::ENDPOINT), $query); |
| 53 | 53 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function fetch(string $transfer_code): self |
| 63 | 63 | { |
| 64 | - $this->get($this->url(self::ENDPOINT).'/'.$transfer_code); |
|
| 64 | + $this->get($this->url(self::ENDPOINT) . '/' . $transfer_code); |
|
| 65 | 65 | |
| 66 | 66 | return $this; |
| 67 | 67 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function verify(string $reference): self |
| 75 | 75 | { |
| 76 | - $this->get($this->url(self::ENDPOINT).'/verify/'.$reference); |
|
| 76 | + $this->get($this->url(self::ENDPOINT) . '/verify/' . $reference); |
|
| 77 | 77 | |
| 78 | 78 | return $this; |
| 79 | 79 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function resendOtp(array $payload): self |
| 87 | 87 | { |
| 88 | - $this->post($this->url(self::ENDPOINT).'/resend_otp', $payload); |
|
| 88 | + $this->post($this->url(self::ENDPOINT) . '/resend_otp', $payload); |
|
| 89 | 89 | |
| 90 | 90 | return $this; |
| 91 | 91 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function disableOtp(): self |
| 99 | 99 | { |
| 100 | - $this->post($this->url(self::ENDPOINT).'/disable_otp'); |
|
| 100 | + $this->post($this->url(self::ENDPOINT) . '/disable_otp'); |
|
| 101 | 101 | |
| 102 | 102 | return $this; |
| 103 | 103 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | public function disableOtpFinalize(array $payload): self |
| 111 | 111 | { |
| 112 | - $this->post($this->url(self::ENDPOINT).'/disable_otp_finalize', $payload); |
|
| 112 | + $this->post($this->url(self::ENDPOINT) . '/disable_otp_finalize', $payload); |
|
| 113 | 113 | |
| 114 | 114 | return $this; |
| 115 | 115 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | public function enableOtp(): self |
| 123 | 123 | { |
| 124 | - $this->post($this->url(self::ENDPOINT).'/enable_otp'); |
|
| 124 | + $this->post($this->url(self::ENDPOINT) . '/enable_otp'); |
|
| 125 | 125 | |
| 126 | 126 | return $this; |
| 127 | 127 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function states(string $country_code): self |
| 27 | 27 | { |
| 28 | - $this->get($this->url('/address_verification/states'), ['country' => $country_code]); |
|
| 28 | + $this->get($this->url('/address_verification/states'), [ 'country' => $country_code ]); |
|
| 29 | 29 | |
| 30 | 30 | return $this; |
| 31 | 31 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @link |
| 25 | 25 | */ |
| 26 | - public function list(array $query = []): self |
|
| 26 | + public function list(array $query = [ ]): self |
|
| 27 | 27 | { |
| 28 | 28 | $this->get($this->url(self::ENDPOINT), $query); |
| 29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function fetch(string $account_id): self |
| 39 | 39 | { |
| 40 | - $this->get($this->url(self::ENDPOINT).'/'.$account_id); |
|
| 40 | + $this->get($this->url(self::ENDPOINT) . '/' . $account_id); |
|
| 41 | 41 | |
| 42 | 42 | return $this; |
| 43 | 43 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function deactivate(string $account_id): self |
| 51 | 51 | { |
| 52 | - $this->delete($this->url(self::ENDPOINT).'/'.$account_id); |
|
| 52 | + $this->delete($this->url(self::ENDPOINT) . '/' . $account_id); |
|
| 53 | 53 | |
| 54 | 54 | return $this; |
| 55 | 55 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function addSplit(array $payload): self |
| 63 | 63 | { |
| 64 | - $this->post($this->url(self::ENDPOINT).'/split', $payload); |
|
| 64 | + $this->post($this->url(self::ENDPOINT) . '/split', $payload); |
|
| 65 | 65 | |
| 66 | 66 | return $this; |
| 67 | 67 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function removeSplit(array $payload): self |
| 75 | 75 | { |
| 76 | - $this->delete($this->url(self::ENDPOINT).'/split', $payload); |
|
| 76 | + $this->delete($this->url(self::ENDPOINT) . '/split', $payload); |
|
| 77 | 77 | |
| 78 | 78 | return $this; |
| 79 | 79 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function providers(): self |
| 87 | 87 | { |
| 88 | - $this->get($this->url(self::ENDPOINT).'/available_providers'); |
|
| 88 | + $this->get($this->url(self::ENDPOINT) . '/available_providers'); |
|
| 89 | 89 | |
| 90 | 90 | return $this; |
| 91 | 91 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @link https://paystack.com/docs/api/#subaccount-list |
| 25 | 25 | */ |
| 26 | - public function list(array $query = []): self |
|
| 26 | + public function list(array $query = [ ]): self |
|
| 27 | 27 | { |
| 28 | 28 | $this->get($this->url(self::ENDPOINT), $query); |
| 29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function fetch(string $subaccount_id): self |
| 39 | 39 | { |
| 40 | - $this->get($this->url(self::ENDPOINT).'/'.$subaccount_id); |
|
| 40 | + $this->get($this->url(self::ENDPOINT) . '/' . $subaccount_id); |
|
| 41 | 41 | |
| 42 | 42 | return $this; |
| 43 | 43 | } |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | * |
| 48 | 48 | * @link https://paystack.com/docs/api/#subaccount-update |
| 49 | 49 | */ |
| 50 | - public function update(string $subaccount_id, array $payload = []): self |
|
| 50 | + public function update(string $subaccount_id, array $payload = [ ]): self |
|
| 51 | 51 | { |
| 52 | - $this->put($this->url(self::ENDPOINT).'/'.$subaccount_id, $payload); |
|
| 52 | + $this->put($this->url(self::ENDPOINT) . '/' . $subaccount_id, $payload); |
|
| 53 | 53 | |
| 54 | 54 | return $this; |
| 55 | 55 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | * |
| 12 | 12 | * @link https://paystack.com/docs/api/#miscellaneous-bank |
| 13 | 13 | */ |
| 14 | - public function list(array $query = []): self |
|
| 14 | + public function list(array $query = [ ]): self |
|
| 15 | 15 | { |
| 16 | 16 | $this->get($this->url(self::ENDPOINT), $query); |
| 17 | 17 | |