Test Failed
Pull Request — master (#256)
by
unknown
04:44 queued 02:07
created
src/Drivers/Pasargad/Pasargad.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     public function __construct(Invoice $invoice, $settings)
61 61
     {
62 62
         $this->invoice($invoice);
63
-        $this->settings = (object)$settings;
63
+        $this->settings = (object) $settings;
64 64
         $this->client = new Client();
65 65
         $this->holder = new PasargadHolder();
66 66
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function pay(): RedirectionForm
104 104
     {
105
-        $paymentUrl = $this->settings->apiBaseUrl . $this->holder->getUrlId();
105
+        $paymentUrl = $this->settings->apiBaseUrl.$this->holder->getUrlId();
106 106
 
107 107
         // redirect using HTML form
108 108
         return $this->redirectWithForm($paymentUrl, ['Token' => $this->holder->getUrlId()]);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             throw new InvalidPaymentException("This transaction is fail.");
148 148
         }
149 149
 
150
-        $receipt =  $this->createReceipt($$verifyResult['data']['referenceNumber']);
150
+        $receipt = $this->createReceipt($$verifyResult['data']['referenceNumber']);
151 151
 
152 152
         $receipt->detail([
153 153
             'resultCode' => $verifyResult['resultCode'],
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $terminalCode = $this->settings->terminalCode;
204 204
         $amount = $this->invoice->getAmount();
205 205
         $redirectAddress = $this->settings->callbackUrl;
206
-        $invoiceNumber = crc32($this->invoice->getUuid()) . rand(0, time());
206
+        $invoiceNumber = crc32($this->invoice->getUuid()).rand(0, time());
207 207
 
208 208
         $iranTime = new DateTime('now', new DateTimeZone('Asia/Tehran'));
209 209
         $invoiceDate = $iranTime->format("Y/m/d H:i:s");
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                 $getTokenUrl,
283 283
                 $data
284 284
             )['token'];
285
-        } catch (GuzzleException|InvalidPaymentException $e) {
285
+        } catch (GuzzleException | InvalidPaymentException $e) {
286 286
             throw new InvalidPaymentException($e->getMessage());
287 287
         }
288 288
     }
Please login to merge, or discard this patch.