@@ -24,7 +24,7 @@ |
||
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 | } |
@@ -111,7 +111,7 @@ |
||
111 | 111 | $soap = new \SoapClient($this->settings->apiVerificationUrl); |
112 | 112 | |
113 | 113 | // step1: verify request |
114 | - $verifyResponse = (int)$soap->bpVerifyRequest($data, $this->settings->apiNamespaceUrl)->return; |
|
114 | + $verifyResponse = (int) $soap->bpVerifyRequest($data, $this->settings->apiNamespaceUrl)->return; |
|
115 | 115 | if ($verifyResponse != 0) { |
116 | 116 | // rollback money and throw exception |
117 | 117 | $soap->bpReversalRequest($data, $this->settings->apiNamespaceUrl); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $block_type = "\x01"; |
92 | 92 | $padding = str_repeat("\xFF", $pad_length); |
93 | 93 | } |
94 | - return "\x00" . $block_type . $padding . "\x00" . $data; |
|
94 | + return "\x00".$block_type.$padding."\x00".$data; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | public static function removePKCS1Padding($data, $blocksize) |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | while ($div > 0) { |
137 | 137 | $mod = bcmod($div, $base); |
138 | 138 | $div = bcdiv($div, $base); |
139 | - $result = chr($mod) . $result; |
|
139 | + $result = chr($mod).$result; |
|
140 | 140 | } |
141 | 141 | return str_pad($result, $blocksize, "\x00", STR_PAD_LEFT); |
142 | 142 | } |
@@ -191,7 +191,7 @@ |
||
191 | 191 | $terminalCode = $this->settings->terminalCode; |
192 | 192 | $amount = $this->invoice->getAmount(); //rial |
193 | 193 | $redirectAddress = $this->settings->callbackUrl; |
194 | - $invoiceNumber = crc32($this->invoice->getUuid()) . rand(0, time()); |
|
194 | + $invoiceNumber = crc32($this->invoice->getUuid()).rand(0, time()); |
|
195 | 195 | $timeStamp = date("Y/m/d H:i:s"); |
196 | 196 | $invoiceDate = date("Y/m/d H:i:s"); |
197 | 197 |