@@ -6,10 +6,10 @@ |
||
6 | 6 | |
7 | 7 | class PaystackFacade extends Facade { |
8 | 8 | /** |
9 | - * Get the registered name of the component. |
|
10 | - * |
|
11 | - * @return string |
|
12 | - */ |
|
9 | + * Get the registered name of the component. |
|
10 | + * |
|
11 | + * @return string |
|
12 | + */ |
|
13 | 13 | protected static function getFacadeAccessor() |
14 | 14 | { |
15 | 15 | return 'laravel-paystack'; |
@@ -20,9 +20,9 @@ |
||
20 | 20 | * @param string $type |
21 | 21 | * @return string |
22 | 22 | */ |
23 | - private static function getPool( $type = 'alnum') |
|
23 | + private static function getPool($type = 'alnum') |
|
24 | 24 | { |
25 | - switch ( $type ) { |
|
25 | + switch ($type) { |
|
26 | 26 | case 'alnum': |
27 | 27 | $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
28 | 28 | break; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | /** |
100 | 100 | * Initiate a payment request to Paystack |
101 | - * @return Unicodeveloper\Paystack\Paystack |
|
101 | + * @return Paystack |
|
102 | 102 | */ |
103 | 103 | public function makePaymentRequest() |
104 | 104 | { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | /** |
111 | 111 | * Make the client request and get the response |
112 | 112 | * @param string $relativeUrl |
113 | - * @return Unicodeveloper\Paystack\Paystack |
|
113 | + * @return Paystack |
|
114 | 114 | */ |
115 | 115 | public function setResponse($relativeUrl) |
116 | 116 | { |
@@ -127,6 +127,9 @@ discard block |
||
127 | 127 | return $this; |
128 | 128 | } |
129 | 129 | |
130 | + /** |
|
131 | + * @param string $relativeUrl |
|
132 | + */ |
|
130 | 133 | private function setGetResponse($relativeUrl) |
131 | 134 | { |
132 | 135 | $this->response = $this->client->get($this->baseUrl . $relativeUrl, []); |
@@ -136,7 +139,7 @@ discard block |
||
136 | 139 | |
137 | 140 | /** |
138 | 141 | * Get the authorization url from the callback response |
139 | - * @return Unicodeveloper\Paystack\Paystack |
|
142 | + * @return Paystack |
|
140 | 143 | */ |
141 | 144 | public function getAuthorizationUrl() |
142 | 145 | { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | private function setRequestOptions() |
87 | 87 | { |
88 | - $authBearer = 'Bearer '. $this->secretKey; |
|
88 | + $authBearer = 'Bearer '.$this->secretKey; |
|
89 | 89 | |
90 | 90 | $this->client = new Client(['base_uri' => $this->baseUrl]); |
91 | 91 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | "email" => request()->email |
121 | 121 | ]; |
122 | 122 | |
123 | - $this->response = $this->client->post($this->baseUrl . $relativeUrl, [ |
|
123 | + $this->response = $this->client->post($this->baseUrl.$relativeUrl, [ |
|
124 | 124 | 'body' => json_encode($data) |
125 | 125 | ]); |
126 | 126 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | private function setGetResponse($relativeUrl) |
131 | 131 | { |
132 | - $this->response = $this->client->get($this->baseUrl . $relativeUrl, []); |
|
132 | + $this->response = $this->client->get($this->baseUrl.$relativeUrl, []); |
|
133 | 133 | |
134 | 134 | return $this; |
135 | 135 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | |
158 | 158 | $relativeUrl = "/transaction/verify/{$transactionRef}"; |
159 | 159 | |
160 | - $this->response = $this->client->get($this->baseUrl . $relativeUrl, []); |
|
160 | + $this->response = $this->client->get($this->baseUrl.$relativeUrl, []); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |