@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | public function __construct(Invoice $invoice, $settings) |
65 | 65 | { |
66 | 66 | $this->invoice($invoice); |
67 | - $this->settings = (object)$settings; |
|
67 | + $this->settings = (object) $settings; |
|
68 | 68 | $this->client = new Client(); |
69 | 69 | $this->convertAmountItems(); |
70 | 70 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | ? $this->settings->fallbackUrl |
89 | 89 | : $callback; |
90 | 90 | $sub_url = self::subUrls['purchase']; |
91 | - $url = $this->settings->apiPaymentUrl . $sub_url; |
|
91 | + $url = $this->settings->apiPaymentUrl.$sub_url; |
|
92 | 92 | |
93 | 93 | $signature = $this->makeSignature( |
94 | 94 | $sub_url, |
@@ -180,8 +180,8 @@ discard block |
||
180 | 180 | */ |
181 | 181 | |
182 | 182 | $new_items = array_map( |
183 | - function ($item) { |
|
184 | - $item['amount'] *= 10; // convert toman to rial |
|
183 | + function($item) { |
|
184 | + $item['amount'] *= 10; // convert toman to rial |
|
185 | 185 | return $item; |
186 | 186 | }, |
187 | 187 | $this->invoice->getDetails()['items'] ?? [] |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | private function getPaymentStatus() |
267 | 267 | { |
268 | 268 | $sub_url = self::subUrls['paymentStatus']; |
269 | - $url = $this->settings->apiPaymentUrl . $sub_url; |
|
269 | + $url = $this->settings->apiPaymentUrl.$sub_url; |
|
270 | 270 | |
271 | 271 | $signature = $this->makeSignature( |
272 | 272 | $sub_url, |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | ]; |
304 | 304 | |
305 | 305 | if (array_key_exists($status, $translations)) { |
306 | - throw new PurchaseFailedException("تراکنش در وضعیت " . $translations[$status] . " است."); |
|
306 | + throw new PurchaseFailedException("تراکنش در وضعیت ".$translations[$status]." است."); |
|
307 | 307 | } else { |
308 | 308 | throw new PurchaseFailedException('خطای ناشناخته ای رخ داده است.'); |
309 | 309 | } |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | private function VerifyTransaction() |
327 | 327 | { |
328 | 328 | $sub_url = self::subUrls['verify']; |
329 | - $url = $this->settings->apiPaymentUrl . $sub_url; |
|
329 | + $url = $this->settings->apiPaymentUrl.$sub_url; |
|
330 | 330 | |
331 | 331 | $signature = $this->makeSignature( |
332 | 332 | $sub_url, |