Test Failed
Pull Request — master (#256)
by
unknown
02:38
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()]);
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             $this->createToken()
144 144
         );
145 145
 
146
-        $receipt =  $this->createReceipt($transactionId);
146
+        $receipt = $this->createReceipt($transactionId);
147 147
 
148 148
         $receipt->detail([
149 149
             'resultCode' => $verifyResult['resultCode'],
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         $terminalCode = $this->settings->terminalCode;
200 200
         $amount = $this->invoice->getAmount();
201 201
         $redirectAddress = $this->settings->callbackUrl;
202
-        $invoiceNumber = crc32($this->invoice->getUuid()) . rand(0, time());
202
+        $invoiceNumber = crc32($this->invoice->getUuid()).rand(0, time());
203 203
 
204 204
         $iranTime = new DateTime('now', new DateTimeZone('Asia/Tehran'));
205 205
         $invoiceDate = $iranTime->format("Y/m/d H:i:s");
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
                 $getTokenUrl,
279 279
                 $data
280 280
             )['token'];
281
-        } catch (GuzzleException|InvalidPaymentException $e) {
281
+        } catch (GuzzleException | InvalidPaymentException $e) {
282 282
             throw new InvalidPaymentException($e->getMessage());
283 283
         }
284 284
     }
Please login to merge, or discard this patch.