@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | private function setRequestOptions() |
79 | 79 | { |
80 | - $authBearer = 'Bearer '. $this->secretKey; |
|
80 | + $authBearer = 'Bearer '.$this->secretKey; |
|
81 | 81 | |
82 | 82 | $this->client = new Client(['base_uri' => $this->baseUrl]); |
83 | 83 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | "email" => request()->email |
114 | 114 | ]; |
115 | 115 | |
116 | - $this->response = $this->client->post($this->baseUrl . $relativeUrl, [ |
|
116 | + $this->response = $this->client->post($this->baseUrl.$relativeUrl, [ |
|
117 | 117 | 'body' => json_encode($data) |
118 | 118 | ]); |
119 | 119 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | $relativeUrl = "/transaction/verify/{$transactionRef}"; |
145 | 145 | |
146 | - $this->response = $this->client->get($this->baseUrl . $relativeUrl, []); |
|
146 | + $this->response = $this->client->get($this->baseUrl.$relativeUrl, []); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | $result = $this->response->json()["message"]; |
158 | 158 | |
159 | - switch($result) |
|
159 | + switch ($result) |
|
160 | 160 | { |
161 | 161 | case self::VS: |
162 | 162 | $validate = true; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | public function getPaymentData() |
181 | 181 | { |
182 | - if($this->isTransactionVerificationValid()) { |
|
182 | + if ($this->isTransactionVerificationValid()) { |
|
183 | 183 | return $this->response->json(); |
184 | 184 | } else { |
185 | 185 | throw new PaymentVerificationFailedException("Invalid Transaction Reference"); |
@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | |
16 | 16 | class TransRef { |
17 | 17 | |
18 | - public static function getPool( $type = 'alnum') |
|
18 | + public static function getPool($type = 'alnum') |
|
19 | 19 | { |
20 | - switch ( $type ) { |
|
20 | + switch ($type) { |
|
21 | 21 | case 'alnum': |
22 | 22 | $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
23 | 23 | break; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $bits = (int) $log + 1; // length in bits |
58 | 58 | $filter = (int) (1 << $bits) - 1; // set all lower bits to 1 |
59 | 59 | do { |
60 | - $rnd = hexdec( bin2hex( openssl_random_pseudo_bytes( $bytes ) ) ); |
|
60 | + $rnd = hexdec(bin2hex(openssl_random_pseudo_bytes($bytes))); |
|
61 | 61 | $rnd = $rnd & $filter; // discard irrelevant bits |
62 | 62 | } while ($rnd >= $range); |
63 | 63 |