@@ -353,7 +353,7 @@ |
||
| 353 | 353 | */ |
| 354 | 354 | public function cancelProcess($response = null) |
| 355 | 355 | { |
| 356 | - if ($this->merchantOrder && $this->error === true) { |
|
| 356 | + if ($this->merchantOrder && $this->error === true) { |
|
| 357 | 357 | sleep(5); |
| 358 | 358 | $id = (!is_null($this->pmtOrder))?$this->pmtOrder->getId():null; |
| 359 | 359 | $status = (!is_null($this->pmtOrder))?$this->pmtOrder->getStatus():null; |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | private function getPmtOrderId() |
| 197 | 197 | { |
| 198 | 198 | try { |
| 199 | - $this->pmtOrderId= Db::getInstance()->getValue( |
|
| 199 | + $this->pmtOrderId = Db::getInstance()->getValue( |
|
| 200 | 200 | 'select order_id from '._DB_PREFIX_.'pmt_order where id = '.$this->merchantOrderId |
| 201 | 201 | ); |
| 202 | 202 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | Configuration::get('PS_OS_PAYMENT'), |
| 279 | 279 | $this->merchantOrder->getOrderTotal(true), |
| 280 | 280 | $this->module->displayName, |
| 281 | - 'pmtOrderId: ' . $this->pmtOrder->getId(), |
|
| 281 | + 'pmtOrderId: '.$this->pmtOrder->getId(), |
|
| 282 | 282 | array('transaction_id' => $this->pmtOrderId), |
| 283 | 283 | null, |
| 284 | 284 | false, |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | protected function unblockConcurrency() |
| 338 | 338 | { |
| 339 | 339 | try { |
| 340 | - Db::getInstance()->delete('pmt_cart_process', 'timestamp < ' . (time() - 6)); |
|
| 340 | + Db::getInstance()->delete('pmt_cart_process', 'timestamp < '.(time() - 6)); |
|
| 341 | 341 | } catch (\Exception $exception) { |
| 342 | 342 | throw new ConcurrencyException(); |
| 343 | 343 | } |
@@ -355,15 +355,15 @@ discard block |
||
| 355 | 355 | { |
| 356 | 356 | if ($this->merchantOrder && $this->error === true) { |
| 357 | 357 | sleep(5); |
| 358 | - $id = (!is_null($this->pmtOrder))?$this->pmtOrder->getId():null; |
|
| 359 | - $status = (!is_null($this->pmtOrder))?$this->pmtOrder->getStatus():null; |
|
| 358 | + $id = (!is_null($this->pmtOrder)) ? $this->pmtOrder->getId() : null; |
|
| 359 | + $status = (!is_null($this->pmtOrder)) ? $this->pmtOrder->getStatus() : null; |
|
| 360 | 360 | $this->module->validateOrder( |
| 361 | 361 | $this->merchantOrderId, |
| 362 | 362 | Configuration::get('PS_OS_ERROR'), |
| 363 | 363 | $this->merchantOrder->getOrderTotal(true), |
| 364 | 364 | $this->module->displayName, |
| 365 | - ' pmtOrderId: ' . $id . |
|
| 366 | - ' pmtStatusId:' . $status, |
|
| 365 | + ' pmtOrderId: '.$id. |
|
| 366 | + ' pmtStatusId:'.$status, |
|
| 367 | 367 | null, |
| 368 | 368 | null, |
| 369 | 369 | false, |
@@ -399,9 +399,9 @@ discard block |
||
| 399 | 399 | 'id_cart' => $this->merchantOrderId, |
| 400 | 400 | 'key' => $this->config['secureKey'], |
| 401 | 401 | 'id_module' => $this->module->id, |
| 402 | - 'id_order' => ($this->pmtOrder)?$this->pmtOrder->getId(): null, |
|
| 402 | + 'id_order' => ($this->pmtOrder) ? $this->pmtOrder->getId() : null, |
|
| 403 | 403 | ); |
| 404 | - $url = ($error)? $this->config['urlKO'] : $this->config['urlOK']; |
|
| 404 | + $url = ($error) ? $this->config['urlKO'] : $this->config['urlOK']; |
|
| 405 | 405 | return $this->redirect($url, $parameters); |
| 406 | 406 | } |
| 407 | 407 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | $parsedUrl = parse_url($url); |
| 36 | 36 | $separator = ($parsedUrl['query'] == null) ? '?' : '&'; |
| 37 | - $redirectUrl = $url. $separator . http_build_query($parameters); |
|
| 37 | + $redirectUrl = $url.$separator.http_build_query($parameters); |
|
| 38 | 38 | Tools::redirect($redirectUrl); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | $response = $exception->getMessage(); |
| 76 | 76 | } else { |
| 77 | 77 | $response = 'Unable to serialize log.'. |
| 78 | - 'data: '. json_encode($data). |
|
| 79 | - 'exception: '. json_encode($exception); |
|
| 78 | + 'data: '.json_encode($data). |
|
| 79 | + 'exception: '.json_encode($exception); |
|
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | Db::getInstance()->insert('pagantis_log', array( |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | if (isset($data['trace'])) { |
| 65 | 65 | $logEntry->setTrace($data['trace']); |
| 66 | 66 | } |
| 67 | - } elseif (!isNull($exception)) { |
|
| 67 | + } elseif (!isNull($exception)) { |
|
| 68 | 68 | $logEntry->error($exception); |
| 69 | 69 | } |
| 70 | 70 | $response = $logEntry->toJson(); |