Passed
Pull Request — master (#155)
by
unknown
08:21
created
config/payment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@
 block discarded – undo
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' => '',
Please login to merge, or discard this patch.
src/Drivers/Aqayepardakht/Aqayepardakht.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 "آدرس بازگشت نمیتواند خالی باشد.";
Please login to merge, or discard this patch.