@@ -589,11 +589,11 @@ discard block |
||
589 | 589 | } |
590 | 590 | |
591 | 591 | $this->magentoOrder->addStatusHistoryComment($metadataInfo) |
592 | - ->setIsCustomerNotified(false) |
|
593 | - ->setEntityName('order') |
|
594 | - ->setTitle($this->getProduct()) |
|
595 | - ->setPayment($this->getProduct()) |
|
596 | - ->save(); |
|
592 | + ->setIsCustomerNotified(false) |
|
593 | + ->setEntityName('order') |
|
594 | + ->setTitle($this->getProduct()) |
|
595 | + ->setPayment($this->getProduct()) |
|
596 | + ->save(); |
|
597 | 597 | |
598 | 598 | $comment = sprintf( |
599 | 599 | 'pagantisOrderId: %s || pagantisOrderStatus: %s || via: %s || product: %s', |
@@ -604,9 +604,9 @@ discard block |
||
604 | 604 | ); |
605 | 605 | |
606 | 606 | $this->magentoOrder->addStatusHistoryComment($comment) |
607 | - ->setIsCustomerNotified(false) |
|
608 | - ->setEntityName('order') |
|
609 | - ->save(); |
|
607 | + ->setIsCustomerNotified(false) |
|
608 | + ->setEntityName('order') |
|
609 | + ->save(); |
|
610 | 610 | |
611 | 611 | if ($this->magentoOrderId == '') { |
612 | 612 | throw new UnknownException('Order can not be saved'); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $this->checkoutSession = $checkoutSession; |
153 | 153 | $this->_request = $request; |
154 | 154 | $this->origin = ( |
155 | - $this->_request->isPost() || $this->_request->getParam('origin')=='notification' |
|
155 | + $this->_request->isPost() || $this->_request->getParam('origin') == 'notification' |
|
156 | 156 | ) ? 'Notification' : 'Order'; |
157 | 157 | $this->product = $this->_request->getParam('product'); |
158 | 158 | } |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $this->checkPagantisStatus(array('AUTHORIZED')); |
318 | 318 | } catch (\Exception $e) { |
319 | 319 | $this->getMagentoOrderId(); |
320 | - if ($this->magentoOrderId!='') { |
|
320 | + if ($this->magentoOrderId != '') { |
|
321 | 321 | throw new AlreadyProcessedException(); |
322 | 322 | } else { |
323 | 323 | throw new WrongStatusException($this->pagantisOrder->getStatus()); |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | */ |
331 | 331 | private function checkMerchantOrderStatus() |
332 | 332 | { |
333 | - if ($this->quote->getIsActive()=='0') { |
|
333 | + if ($this->quote->getIsActive() == '0') { |
|
334 | 334 | $this->getMagentoOrderId(); |
335 | 335 | throw new AlreadyProcessedException(); |
336 | 336 | } |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | $tableName = $this->dbObject->getTableName(self::CONCURRENCY_TABLE); |
463 | 463 | if ($mode == false) { |
464 | 464 | $dbConnection->delete($tableName, "timestamp<".(time() - 5)); |
465 | - } elseif ($this->quoteId!='') { |
|
465 | + } elseif ($this->quoteId != '') { |
|
466 | 466 | $dbConnection->delete($tableName, "id=".$this->quoteId); |
467 | 467 | } |
468 | 468 | } catch (Exception $exception) { |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | $this->getPagantisOrderId(); |
502 | 502 | $this->getMagentoOrderId(); |
503 | 503 | |
504 | - $logMessage = sprintf( |
|
504 | + $logMessage = sprintf( |
|
505 | 505 | "User waiting %s seconds, default seconds %s, bd time to expire %s seconds[quoteId=%s][origin=%s]", |
506 | 506 | $expirationSec, |
507 | 507 | self::CONCURRENCY_TIMEOUT, |
@@ -552,15 +552,15 @@ discard block |
||
552 | 552 | if ($this->pagantisOrderId == '') { |
553 | 553 | $this->getPagantisOrderId(); |
554 | 554 | } |
555 | - $pagantisOrderId = $this->pagantisOrderId; |
|
555 | + $pagantisOrderId = $this->pagantisOrderId; |
|
556 | 556 | |
557 | - $query = sprintf( |
|
557 | + $query = sprintf( |
|
558 | 558 | "select mg_order_id from %s where id='%s' and order_id='%s'", |
559 | 559 | $tableName, |
560 | 560 | $this->quoteId, |
561 | 561 | $pagantisOrderId |
562 | 562 | ); |
563 | - $queryResult = $dbConnection->fetchRow($query); |
|
563 | + $queryResult = $dbConnection->fetchRow($query); |
|
564 | 564 | $this->magentoOrderId = $queryResult['mg_order_id']; |
565 | 565 | } catch (\Exception $e) { |
566 | 566 | throw new UnknownException($e->getMessage()); |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | $metadataInfo = null; |
585 | 585 | foreach ($metadataOrder as $metadataKey => $metadataValue) { |
586 | 586 | if ($metadataKey == 'promotedProduct') { |
587 | - $metadataInfo.= " Producto promocionado = $metadataValue //"; |
|
587 | + $metadataInfo .= " Producto promocionado = $metadataValue //"; |
|
588 | 588 | } |
589 | 589 | } |
590 | 590 | |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | /** @var \Magento\Framework\DB\Adapter\AdapterInterface $dbConnection */ |
626 | 626 | $dbConnection = $this->dbObject->getConnection(); |
627 | 627 | $tableName = $this->dbObject->getTableName(self::ORDERS_TABLE); |
628 | - $pagantisOrderId = $this->pagantisOrder->getId(); |
|
628 | + $pagantisOrderId = $this->pagantisOrder->getId(); |
|
629 | 629 | $dbConnection->update( |
630 | 630 | $tableName, |
631 | 631 | array('mg_order_id' => $this->magentoOrderId), |
@@ -701,7 +701,7 @@ discard block |
||
701 | 701 | $this->getMagentoOrderId(); |
702 | 702 | } |
703 | 703 | |
704 | - if ($this->magentoOrderId!='') { |
|
704 | + if ($this->magentoOrderId != '') { |
|
705 | 705 | /** @var Order $this->magentoOrder */ |
706 | 706 | $this->magentoOrder = $this->orderRepositoryInterface->get($this->magentoOrderId); |
707 | 707 | if (!$this->_objectManager->get(\Magento\Checkout\Model\Session\SuccessValidator::class)->isValid()) { |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | $orderStatus = strtolower($this->magentoOrder->getStatus()); |
728 | 728 | $acceptedStatus = array('processing', 'completed'); |
729 | 729 | if (in_array($orderStatus, $acceptedStatus)) { |
730 | - if (isset($this->extraConfig['PAGANTIS_OK_URL']) && $this->extraConfig['PAGANTIS_OK_URL']!= '') { |
|
730 | + if (isset($this->extraConfig['PAGANTIS_OK_URL']) && $this->extraConfig['PAGANTIS_OK_URL'] != '') { |
|
731 | 731 | $returnUrl = $this->extraConfig['PAGANTIS_OK_URL']; |
732 | 732 | } else { |
733 | 733 | $returnUrl = 'checkout/onepage/success'; |