@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | { |
46 | 46 | $this->invoice($invoice); |
47 | 47 | $this->setUpHttpClient($settings->apiBaseUrl); |
48 | - $this->settings=$settings; |
|
48 | + $this->settings = $settings; |
|
49 | 49 | $this->accessToken = $this->getAccessToken(); |
50 | 50 | } |
51 | 51 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function purchase(): string |
56 | 56 | { |
57 | 57 | $details = $this->invoice->getDetails(); |
58 | - $phone = $details['phone']??$details['mobile']??null; |
|
58 | + $phone = $details['phone'] ?? $details['mobile'] ?? null; |
|
59 | 59 | $data = [ |
60 | 60 | 'amount' => $this->invoice->getAmount(), |
61 | 61 | 'phone' => $phone, |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function verify(): ReceiptInterface |
89 | 89 | { |
90 | - $tracingId=Request::input("trackingCode"); |
|
91 | - $header =[ |
|
90 | + $tracingId = Request::input("trackingCode"); |
|
91 | + $header = [ |
|
92 | 92 | "Accept" => "application/json", |
93 | 93 | "Authorization" => "Bearer ".$this->accessToken |
94 | 94 | ]; |
@@ -130,7 +130,7 @@ |
||
130 | 130 | |
131 | 131 | $responseData = json_decode($response->getBody()->getContents(), true); |
132 | 132 | |
133 | - return $this->response($responseData??[], $response->getStatusCode()); |
|
133 | + return $this->response($responseData ?? [], $response->getStatusCode()); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
@@ -292,8 +292,8 @@ |
||
292 | 292 | */ |
293 | 293 | public function throwError(string $exception, string $message = null) |
294 | 294 | { |
295 | - if (! $this->isSuccess()) { |
|
296 | - throw new $exception($message??$this->getStatusMessages()); |
|
295 | + if (!$this->isSuccess()) { |
|
296 | + throw new $exception($message ?? $this->getStatusMessages()); |
|
297 | 297 | } |
298 | 298 | } |
299 | 299 |