Passed
Pull Request — master (#20)
by mahdi
03:17
created
src/Provider/PaymentServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         /**
25 25
          * Bind to service container.
26 26
          */
27
-        $this->app->bind('shetabit-payment', function () {
27
+        $this->app->bind('shetabit-payment', function() {
28 28
             return new PaymentManager(config('payment'));
29 29
         });
30 30
     }
Please login to merge, or discard this patch.
src/Drivers/Parsian/Parsian.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function __construct(Invoice $invoice, $settings)
33 33
     {
34 34
         $this->invoice($invoice);
35
-        $this->settings = (object)$settings;
35
+        $this->settings = (object) $settings;
36 36
     }
37 37
 
38 38
     /**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $result = $response['ConfirmPaymentResult'];
118 118
 
119 119
         if (!isset($result['Status']) || $result['Status'] != 0 || !isset($result['RRN']) || $result['RRN'] <= 0) {
120
-            $message = 'خطا از سمت بانک با کد ' . $result['Status'] . ' رخ داده است.';
120
+            $message = 'خطا از سمت بانک با کد '.$result['Status'].' رخ داده است.';
121 121
             throw new InvalidPaymentException($message);
122 122
         }
123 123
 
Please login to merge, or discard this patch.
src/Drivers/Irankish/Irankish.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function __construct(Invoice $invoice, $settings)
33 33
     {
34 34
         $this->invoice($invoice);
35
-        $this->settings = (object)$settings;
35
+        $this->settings = (object) $settings;
36 36
     }
37 37
 
38 38
     /**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $soap = new \SoapClient($this->settings->apiVerificationUrl);
118 118
         $response = $soap->KicccPaymentsVerification($data);
119 119
 
120
-        $status = (int)($response->KicccPaymentsVerificationResult);
120
+        $status = (int) ($response->KicccPaymentsVerificationResult);
121 121
 
122 122
         if ($status != $data['amount']) {
123 123
             $this->notVerified($status);
Please login to merge, or discard this patch.
src/Drivers/Asanpardakht/Asanpardakht.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
          *   $resMessage = $returningParams[4];
114 114
          *   $rrn = $returningParams[6];
115 115
          *   $lastFourDigitOfPAN = $returningParams[7];
116
-        **/
116
+         **/
117 117
 
118 118
         $resCode = $returningParams[3];
119 119
         $payGateTranID = $returningParams[5];
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function __construct(Invoice $invoice, $settings)
36 36
     {
37 37
         $this->invoice($invoice);
38
-        $this->settings = (object)$settings;
38
+        $this->settings = (object) $settings;
39 39
     }
40 40
 
41 41
     /**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $params = $this->preparePurchaseData();
62 62
         $result = $client->RequestOperation($params);
63 63
 
64
-        if (! $result) {
64
+        if (!$result) {
65 65
             throw  new PurchaseFailedException('خطای فراخوانی متد درخواست تراکنش.');
66 66
         }
67 67
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $payGateTranID = $returningParams[5];
123 123
 
124 124
         if ($resCode != '0' && $resCode != '00') {
125
-            $message =  "خطای شماره " . $resCode . " رخ داده و تراکنش ناموفق بوده است.";
125
+            $message = "خطای شماره ".$resCode." رخ داده و تراکنش ناموفق بوده است.";
126 126
             throw new InvalidPaymentException($message);
127 127
         }
128 128
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         // step1: verify
142 142
         $result = $client->RequestVerification($params);
143 143
 
144
-        if (! $result) {
144
+        if (!$result) {
145 145
             throw new InvalidPaymentException("خطای فراخوانی متد وريفای رخ داده است.");
146 146
         }
147 147
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         // step2: settle
155 155
         $result = $client->RequestReconciliation($params);
156 156
 
157
-        if (! $result) {
157
+        if (!$result) {
158 158
             throw new InvalidPaymentException('خطای فراخوانی متد تسويه رخ داده است.');
159 159
         }
160 160
 
Please login to merge, or discard this patch.
src/Drivers/Ipay/Idpay.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
      */
100 100
     public function pay()
101 101
     {
102
-        $apiUrl =  $this->settings->apiPaymentUrl;
102
+        $apiUrl = $this->settings->apiPaymentUrl;
103 103
 
104 104
         // use sandbox url if we are in sandbox mode
105 105
         if (!empty($this->settings->sandbox)) {
Please login to merge, or discard this patch.
src/Drivers/Yekpay/Yekpay.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function __construct(Invoice $invoice, $settings)
33 33
     {
34 34
         $this->invoice($invoice);
35
-        $this->settings = (object)$settings;
35
+        $this->settings = (object) $settings;
36 36
     }
37 37
 
38 38
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $data->merchantId = $this->settings->merchantId;
67 67
         $data->amount = $this->invoice->getAmount();
68 68
         $data->callback = $this->settings->callbackUrl;
69
-        $data->orderNumber = intval(1, time()) . crc32($this->invoice->getUuid());
69
+        $data->orderNumber = intval(1, time()).crc32($this->invoice->getUuid());
70 70
 
71 71
         $data->fromCurrencyCode = 978;
72 72
         $data->toCurrencyCode = 364;
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function pay()
105 105
     {
106
-        $payUrl = $this->settings->apiPaymentUrl . $this->invoice->getTransactionId();
106
+        $payUrl = $this->settings->apiPaymentUrl.$this->invoice->getTransactionId();
107 107
 
108 108
         // redirect using laravel logic
109 109
         return redirect()->to($payUrl);
Please login to merge, or discard this patch.
src/Drivers/Paystar/Paystar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,8 +97,8 @@
 block discarded – undo
97 97
      */
98 98
     public function pay()
99 99
     {
100
-        $apiUrl =  $this->settings->apiPaymentUrl;
101
-        $payUrl = $apiUrl . $this->invoice->getTransactionId();
100
+        $apiUrl = $this->settings->apiPaymentUrl;
101
+        $payUrl = $apiUrl.$this->invoice->getTransactionId();
102 102
 
103 103
         // redirect using laravel logic
104 104
         return redirect()->to($payUrl);
Please login to merge, or discard this patch.
src/Drivers/Sadad/Sadad.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public function __construct(Invoice $invoice, $settings)
44 44
     {
45 45
         $this->invoice($invoice);
46
-        $this->settings = (object)$settings;
46
+        $this->settings = (object) $settings;
47 47
         $this->client = new Client();
48 48
     }
49 49
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
         $body = json_decode($response->getBody()->getContents(), true);
92 92
 
93
-        if ($body->ResCode!=0) {
93
+        if ($body->ResCode != 0) {
94 94
             throw new PurchaseFailedException($body->Description);
95 95
         }
96 96
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $resCode = request()->get('ResCode');
130 130
         $message = 'تراکنش نا موفق بود در صورت کسر مبلغ از حساب شما حداکثر پس از 72 ساعت مبلغ به حسابتان برمیگردد.';
131 131
 
132
-        if ($resCode==0) {
132
+        if ($resCode == 0) {
133 133
             throw new InvalidPaymentException($message);
134 134
         }
135 135
 
Please login to merge, or discard this patch.
src/Drivers/Zarinpal/Zarinpal.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public function __construct(Invoice $invoice, $settings)
44 44
     {
45 45
         $this->invoice($invoice);
46
-        $this->settings = (object)$settings;
46
+        $this->settings = (object) $settings;
47 47
         $this->client = new Client();
48 48
     }
49 49
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         if (strtolower($this->getMode()) == 'zaringate') {
100 100
             $payUrl = str_replace(':authority', $transactionId, $paymentUrl);
101 101
         } else {
102
-            $payUrl = $paymentUrl . $transactionId;
102
+            $payUrl = $paymentUrl.$transactionId;
103 103
         }
104 104
 
105 105
         // redirect using laravel logic
Please login to merge, or discard this patch.