@@ -195,9 +195,9 @@ |
||
195 | 195 | -90 => 'تراکنش قبلا تایید شده است' |
196 | 196 | ); |
197 | 197 | if (array_key_exists($status, $translations)) { |
198 | - throw new InvalidPaymentException($translations[$status],is_numeric($status)?$status:0); |
|
198 | + throw new InvalidPaymentException($translations[$status], is_numeric($status) ? $status : 0); |
|
199 | 199 | } else { |
200 | - throw new InvalidPaymentException('خطای ناشناخته ای رخ داده است.',is_numeric($status)?$status:0); |
|
200 | + throw new InvalidPaymentException('خطای ناشناخته ای رخ داده است.', is_numeric($status) ? $status : 0); |
|
201 | 201 | } |
202 | 202 | } |
203 | 203 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->invoice->transactionId($result->Token); |
67 | 67 | } else { |
68 | 68 | // an error has happened |
69 | - throw new PurchaseFailedException($result->Message,$result->Status??0); |
|
69 | + throw new PurchaseFailedException($result->Message, $result->Status ?? 0); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | // return the transaction's id |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function pay() : RedirectionForm |
82 | 82 | { |
83 | - $payUrl = $this->settings->apiPaymentUrl . '?Token=' . $this->invoice->getTransactionId() ; |
|
83 | + $payUrl = $this->settings->apiPaymentUrl.'?Token='.$this->invoice->getTransactionId(); |
|
84 | 84 | |
85 | 85 | return $this->redirectWithForm( |
86 | 86 | $payUrl, |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $hasWrongRRN = (!isset($result->RRN) || $result->RRN <= 0); |
120 | 120 | if ($hasWrongStatus || $hasWrongRRN) { |
121 | 121 | $message = 'خطا از سمت بانک با کد '.$result->Status.' رخ داده است.'; |
122 | - throw new InvalidPaymentException($message,$result->Status); |
|
122 | + throw new InvalidPaymentException($message, $result->Status); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | return $this->createReceipt($result->RRN); |