@@ -314,7 +314,7 @@ |
||
314 | 314 | 'apiPaymentUrl' => 'https://panel.aqayepardakht.ir/startpay/', |
315 | 315 | 'apiPaymentUrlSandbox' => 'https://panel.aqayepardakht.ir/startpay/sandbox/', |
316 | 316 | 'apiVerificationUrl' => 'https://panel.aqayepardakht.ir/api/v2/verify', |
317 | - 'mode' => 'normal' , //normal | sandbox |
|
317 | + 'mode' => 'normal', //normal | sandbox |
|
318 | 318 | 'callbackUrl' => '', |
319 | 319 | 'pin' => '', |
320 | 320 | 'invoice_id' => '', |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function pay(): RedirectionForm |
92 | 92 | { |
93 | 93 | $url = $this->settings->mode === "normal" ? $this->settings->apiPaymentUrl : $this->settings->apiPaymentUrlSandbox; |
94 | - $url = $url . $this->invoice->getTransactionId(); |
|
94 | + $url = $url.$this->invoice->getTransactionId(); |
|
95 | 95 | |
96 | 96 | return $this->redirectWithForm($url, [], 'GET'); |
97 | 97 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | public function verify(): ReceiptInterface |
106 | 106 | { |
107 | 107 | $tracking_number = Request::get('tracking_number'); |
108 | - if ($tracking_number === null || $tracking_number === ""){ |
|
108 | + if ($tracking_number === null || $tracking_number === "") { |
|
109 | 109 | $this->notVerified('پرداخت ناموفق.'); |
110 | 110 | } |
111 | 111 | $data = [ |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | * @param $message |
157 | 157 | * @throws \Shetabit\Multipay\Exceptions\InvalidPaymentException |
158 | 158 | */ |
159 | - protected function notVerified($message){ |
|
159 | + protected function notVerified($message) { |
|
160 | 160 | if (empty($message)) { |
161 | 161 | throw new InvalidPaymentException('خطای ناشناخته ای رخ داده است.'); |
162 | 162 | } else { |
@@ -168,9 +168,9 @@ discard block |
||
168 | 168 | * @param $code |
169 | 169 | * @return string |
170 | 170 | */ |
171 | - protected function getErrorMessage($code){ |
|
172 | - $code = (int)$code; |
|
173 | - switch ($code){ |
|
171 | + protected function getErrorMessage($code) { |
|
172 | + $code = (int) $code; |
|
173 | + switch ($code) { |
|
174 | 174 | case -1: return "مبلغ نباید خالی باشد."; |
175 | 175 | case -2: return "کد پین درگاه نمیتواند خالی باشد."; |
176 | 176 | case -3: return "آدرس بازگشت نمیتواند خالی باشد."; |