Passed
Branch master (5082b1)
by mahdi
07:30
created
src/Drivers/Behpardakht/Behpardakht.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public function __construct(Invoice $invoice, $settings)
39 39
     {
40 40
         $this->invoice($invoice);
41
-        $this->settings = (object)$settings;
41
+        $this->settings = (object) $settings;
42 42
     }
43 43
 
44 44
     /**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         // purchase was not successful
66 66
         if ($data[0] != "0") {
67
-            throw new PurchaseFailedException($this->translateStatus($data[0]), (int)$data[0]);
67
+            throw new PurchaseFailedException($this->translateStatus($data[0]), (int) $data[0]);
68 68
         }
69 69
 
70 70
         $this->invoice->transactionId($data[1]);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $soap = new \SoapClient($this->settings->apiVerificationUrl);
114 114
 
115 115
         // step1: verify request
116
-        $verifyResponse = (int)$soap->bpVerifyRequest($data)->return;
116
+        $verifyResponse = (int) $soap->bpVerifyRequest($data)->return;
117 117
         if ($verifyResponse != 0) {
118 118
             // rollback money and throw exception
119 119
             // avoid rollback if request was already verified
Please login to merge, or discard this patch.
src/Drivers/Asanpardakht/Asanpardakht.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function __construct(Invoice $invoice, $settings)
38 38
     {
39 39
         $this->invoice($invoice);
40
-        $this->settings = (object)$settings;
40
+        $this->settings = (object) $settings;
41 41
     }
42 42
 
43 43
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
         $result = $result->RequestOperationResult;
62 62
         if ($result[0] != '0') {
63
-            $message = "خطای شماره " . $result . " رخ داده است.";
63
+            $message = "خطای شماره ".$result." رخ داده است.";
64 64
             throw  new PurchaseFailedException($message);
65 65
         }
66 66
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         $payGateTranID = $returningParams[5];
120 120
 
121 121
         if ($resCode != '0' && $resCode != '00') {
122
-            $message = "خطای شماره " . $resCode . " رخ داده و تراکنش ناموفق بوده است.";
122
+            $message = "خطای شماره ".$resCode." رخ داده و تراکنش ناموفق بوده است.";
123 123
             throw new InvalidPaymentException($message);
124 124
         }
125 125
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
         $result = $result->RequestVerificationResult;
154 154
         if ($result != '500') {
155
-            $message = "خطای شماره: " . $result . " در هنگام Verify";
155
+            $message = "خطای شماره: ".$result." در هنگام Verify";
156 156
             throw  new InvalidPaymentException($message);
157 157
         }
158 158
     }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
         $result = $result->RequestReconciliationResult;
176 176
         if ($result != '600') {
177
-            $message = "خطای شماره: " . $result . " در هنگام Settlement";
177
+            $message = "خطای شماره: ".$result." در هنگام Settlement";
178 178
             throw new InvalidPaymentException($message);
179 179
         }
180 180
     }
Please login to merge, or discard this patch.
src/Drivers/Sepehr/Sepehr.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function __construct(Invoice $invoice, $settings)
40 40
     {
41 41
         $this->invoice($invoice);
42
-        $this->settings = (object)$settings;
42
+        $this->settings = (object) $settings;
43 43
     }
44 44
 
45 45
     /**
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
         $mobile = '';
57 57
         //set CellNumber for get user cards
58 58
         if (!empty($this->invoice->getDetails()['mobile'])) {
59
-            $mobile = '&CellNumber=' . $this->invoice->getDetails()['mobile'];
59
+            $mobile = '&CellNumber='.$this->invoice->getDetails()['mobile'];
60 60
         }
61 61
 
62
-        $data_query = 'Amount=' . $this->test_input($amount) . '&callbackURL=' . $this->test_input($this->settings->callbackUrl) . '&InvoiceID=' . $this->test_input($this->invoice->getUuid()) . '&TerminalID=' . $this->test_input($this->settings->terminalId) . '&Payload=' . $this->test_input("") . $mobile;
62
+        $data_query = 'Amount='.$this->test_input($amount).'&callbackURL='.$this->test_input($this->settings->callbackUrl).'&InvoiceID='.$this->test_input($this->invoice->getUuid()).'&TerminalID='.$this->test_input($this->settings->terminalId).'&Payload='.$this->test_input("").$mobile;
63 63
         $address_service_token = $this->settings->apiGetToken;
64 64
 
65 65
         $token_array = $this->makeHttpChargeRequest('POST', $data_query, $address_service_token);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             $this->notVerified($resp_code);
113 113
         }
114 114
 
115
-        $data_query = 'digitalreceipt=' . Request::input('digitalreceipt') . '&Tid=' . $this->settings->terminalId;
115
+        $data_query = 'digitalreceipt='.Request::input('digitalreceipt').'&Tid='.$this->settings->terminalId;
116 116
         $advice_array = $this->makeHttpChargeRequest('POST', $data_query, $this->settings->apiVerificationUrl);
117 117
         $decode_advice_array = json_decode($advice_array);
118 118
 
Please login to merge, or discard this patch.
src/Drivers/Saman/Saman.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function __construct(Invoice $invoice, $settings)
38 38
     {
39 39
         $this->invoice($invoice);
40
-        $this->settings = (object)$settings;
40
+        $this->settings = (object) $settings;
41 41
     }
42 42
 
43 43
     /**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         $response = $soap->RequestToken($data['MID'], $data['ResNum'], $data['Amount'], $data['CellNumber']);
70 70
 
71
-        $status = (int)$response;
71
+        $status = (int) $response;
72 72
 
73 73
         if ($status < 0) { // if something has done in a wrong way
74 74
             $this->purchaseFailed($response);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         );
117 117
 
118 118
         $soap = new \SoapClient($this->settings->apiVerificationUrl);
119
-        $status = (int)$soap->VerifyTransaction($data['RefNum'], $data['merchantId']);
119
+        $status = (int) $soap->VerifyTransaction($data['RefNum'], $data['merchantId']);
120 120
 
121 121
         if ($status < 0) {
122 122
             $this->notVerified($status);
Please login to merge, or discard this patch.