@@ -69,7 +69,7 @@ |
||
69 | 69 | */ |
70 | 70 | public function getUuid($needNumericUuid = false) |
71 | 71 | { |
72 | - if($needNumericUuid){ |
|
72 | + if ($needNumericUuid) { |
|
73 | 73 | $this->uuid = !is_numeric($this->uuid) ? crc32($this->uuid) : $this->uuid; |
74 | 74 | } |
75 | 75 | return $this->uuid; |
@@ -193,7 +193,7 @@ |
||
193 | 193 | $terminalCode = $this->settings->terminalCode; |
194 | 194 | $amount = $this->invoice->getAmount(); //rial |
195 | 195 | $redirectAddress = $this->settings->callbackUrl; |
196 | - $invoiceNumber = $this->invoice->getUuid(true) . rand(0, time()); |
|
196 | + $invoiceNumber = $this->invoice->getUuid(true).rand(0, time()); |
|
197 | 197 | $timeStamp = date("Y/m/d H:i:s"); |
198 | 198 | $invoiceDate = date("Y/m/d H:i:s"); |
199 | 199 |
@@ -37,7 +37,7 @@ discard block |
||
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 |
||
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,13 +116,13 @@ discard block |
||
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); |
123 | 123 | } |
124 | 124 | |
125 | - $receipt = $this->createReceipt($data['RefNum']); |
|
125 | + $receipt = $this->createReceipt($data['RefNum']); |
|
126 | 126 | $receipt->detail([ |
127 | 127 | 'traceNo' => Request::input('TRACENO'), |
128 | 128 | 'referenceNo' => Request::input('RRN'), |