@@ -82,8 +82,8 @@ |
||
82 | 82 | $paylaterPublicKey = Configuration::get('pmt_public_key'); |
83 | 83 | $paylaterPrivateKey = Configuration::get('pmt_private_key'); |
84 | 84 | $okUrl = _PS_BASE_URL_SSL_.__PS_BASE_URI__ |
85 | - .'index.php?canonical=true&fc=module&module=paylater&controller=notify&' |
|
86 | - .http_build_query($query) |
|
85 | + .'index.php?canonical=true&fc=module&module=paylater&controller=notify&' |
|
86 | + .http_build_query($query) |
|
87 | 87 | ; |
88 | 88 | |
89 | 89 | $shippingAddress = new Address($cart->id_address_delivery); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | private function getPmtOrderId() |
192 | 192 | { |
193 | 193 | try { |
194 | - $this->pmtOrderId= Db::getInstance()->getValue( |
|
194 | + $this->pmtOrderId = Db::getInstance()->getValue( |
|
195 | 195 | 'select order_id from '._DB_PREFIX_.'pmt_order where id = '.$this->merchantOrderId |
196 | 196 | ); |
197 | 197 | |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | public function validateAmount() |
254 | 254 | { |
255 | 255 | $totalAmount = $this->pmtOrder->getShoppingCart()->getTotalAmount(); |
256 | - $merchantAmount = (int)((string) (100 * $this->merchantOrder->getOrderTotal(true))); |
|
256 | + $merchantAmount = (int) ((string) (100 * $this->merchantOrder->getOrderTotal(true))); |
|
257 | 257 | if ($totalAmount != $merchantAmount) { |
258 | 258 | throw new AmountMismatchException($totalAmount, $merchantAmount); |
259 | 259 | } |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | Configuration::get('PS_OS_PAYMENT'), |
273 | 273 | $this->merchantOrder->getOrderTotal(true), |
274 | 274 | $this->module->displayName, |
275 | - 'pmtOrderId: ' . $this->pmtOrder->getId(), |
|
275 | + 'pmtOrderId: '.$this->pmtOrder->getId(), |
|
276 | 276 | array('transaction_id' => $this->pmtOrderId), |
277 | 277 | null, |
278 | 278 | false, |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | protected function unblockConcurrency() |
332 | 332 | { |
333 | 333 | try { |
334 | - Db::getInstance()->delete('pmt_cart_process', 'timestamp < ' . (time() - 6)); |
|
334 | + Db::getInstance()->delete('pmt_cart_process', 'timestamp < '.(time() - 6)); |
|
335 | 335 | } catch (\Exception $exception) { |
336 | 336 | throw new ConcurrencyException(); |
337 | 337 | } |
@@ -349,13 +349,13 @@ discard block |
||
349 | 349 | { |
350 | 350 | sleep(5); |
351 | 351 | if ($this->merchantOrder) { |
352 | - $id = (!is_null($this->pmtOrder))?$this->pmtOrder->getId():null; |
|
352 | + $id = (!is_null($this->pmtOrder)) ? $this->pmtOrder->getId() : null; |
|
353 | 353 | $this->module->validateOrder( |
354 | 354 | $this->merchantOrderId, |
355 | 355 | Configuration::get('PS_OS_ERROR'), |
356 | 356 | $this->merchantOrder->getOrderTotal(true), |
357 | 357 | $this->module->displayName, |
358 | - 'pmtOrderId: ' . $id, |
|
358 | + 'pmtOrderId: '.$id, |
|
359 | 359 | null, |
360 | 360 | null, |
361 | 361 | false, |
@@ -391,9 +391,9 @@ discard block |
||
391 | 391 | 'id_cart' => $this->merchantOrderId, |
392 | 392 | 'key' => $this->config['secureKey'], |
393 | 393 | 'id_module' => $this->module->id, |
394 | - 'id_order' => ($this->pmtOrder)?$this->pmtOrder->getId(): null, |
|
394 | + 'id_order' => ($this->pmtOrder) ? $this->pmtOrder->getId() : null, |
|
395 | 395 | ); |
396 | - $url = ($error)? $this->config['urlKO'] : $this->config['urlOK']; |
|
396 | + $url = ($error) ? $this->config['urlKO'] : $this->config['urlOK']; |
|
397 | 397 | return $this->redirect($url, $parameters); |
398 | 398 | } |
399 | 399 | } |