@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * Initiate a payment request to Paystack |
| 94 | - * @return Unicodeveloper\Paystack\Paystack |
|
| 94 | + * @return Paystack |
|
| 95 | 95 | */ |
| 96 | 96 | public function makePaymentRequest() |
| 97 | 97 | { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | /** |
| 104 | 104 | * Make the client request and get the response |
| 105 | 105 | * @param string $relativeUrl |
| 106 | - * @return Unicodeveloper\Paystack\Paystack |
|
| 106 | + * @return Paystack |
|
| 107 | 107 | */ |
| 108 | 108 | public function setResponse($relativeUrl) |
| 109 | 109 | { |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | 124 | * Get the authorization url from the callback response |
| 125 | - * @return Unicodeveloper\Paystack\Paystack |
|
| 125 | + * @return Paystack |
|
| 126 | 126 | */ |
| 127 | 127 | public function getAuthorizationUrl() |
| 128 | 128 | { |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | private function setRequestOptions() |
| 80 | 80 | { |
| 81 | - $authBearer = 'Bearer '. $this->secretKey; |
|
| 81 | + $authBearer = 'Bearer '.$this->secretKey; |
|
| 82 | 82 | |
| 83 | 83 | $this->client = new Client(['base_uri' => $this->baseUrl]); |
| 84 | 84 | |
@@ -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"); |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | |
| 215 | 215 | // Generate a version 1 (time-based) UUID object |
| 216 | 216 | $uuid1 = Uuid::uuid1(); |
| 217 | - echo $uuid1->toString() . "\n"; // i.e. e4eaaaf2-d142-11e1-b3e4-080027620cdd |
|
| 217 | + echo $uuid1->toString()."\n"; // i.e. e4eaaaf2-d142-11e1-b3e4-080027620cdd |
|
| 218 | 218 | |
| 219 | 219 | // // Generate a version 3 (name-based and hashed with MD5) UUID object |
| 220 | 220 | // $uuid3 = Uuid::uuid3(Uuid::NAMESPACE_DNS, 'php.net'); |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | |
| 233 | 233 | // Some dependency was not met. Either the method cannot be called on a |
| 234 | 234 | // 32-bit system, or it can, but it relies on Moontoast\Math to be present. |
| 235 | - echo 'Caught exception: ' . $e->getMessage() . "\n"; |
|
| 235 | + echo 'Caught exception: '.$e->getMessage()."\n"; |
|
| 236 | 236 | |
| 237 | 237 | } |
| 238 | 238 | } |