@@ -16,22 +16,22 @@ |
||
| 16 | 16 | * @var array $defaultConfigs |
| 17 | 17 | */ |
| 18 | 18 | public $defaultConfigs = array('PAGANTIS_TITLE'=>'Instant Financing', |
| 19 | - 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
| 20 | - 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
| 21 | - 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
| 22 | - 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
| 23 | - 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
| 24 | - 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
| 25 | - 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
| 26 | - 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
| 27 | - 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
| 28 | - 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
| 29 | - 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
| 30 | - 'PAGANTIS_URL_OK'=>'', |
|
| 31 | - 'PAGANTIS_URL_KO'=>'', |
|
| 32 | - 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!', |
|
| 33 | - 'PAGANTIS_ALLOWED_COUNTRIES' => 'a:2:{i:0;s:2:"es";i:1;s:2:"it";}', |
|
| 34 | - 'PAGANTIS_PROMOTION_EXTRA' => '<p class="promoted">Finance this product <span class="pmt-no-interest">without interest!</span></p>' |
|
| 19 | + 'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE', |
|
| 20 | + 'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE', |
|
| 21 | + 'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons', |
|
| 22 | + 'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3, |
|
| 23 | + 'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12, |
|
| 24 | + 'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default', |
|
| 25 | + 'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER', |
|
| 26 | + 'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default', |
|
| 27 | + 'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default', |
|
| 28 | + 'PAGANTIS_FORM_DISPLAY_TYPE'=>0, |
|
| 29 | + 'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1, |
|
| 30 | + 'PAGANTIS_URL_OK'=>'', |
|
| 31 | + 'PAGANTIS_URL_KO'=>'', |
|
| 32 | + 'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!', |
|
| 33 | + 'PAGANTIS_ALLOWED_COUNTRIES' => 'a:2:{i:0;s:2:"es";i:1;s:2:"it";}', |
|
| 34 | + 'PAGANTIS_PROMOTION_EXTRA' => '<p class="promoted">Finance this product <span class="pmt-no-interest">without interest!</span></p>' |
|
| 35 | 35 | ); |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -234,9 +234,9 @@ discard block |
||
| 234 | 234 | if ($promotedProduct == 'true') { |
| 235 | 235 | $promotedAmount+=$product->getAmount()*$item->getQty(); |
| 236 | 236 | $promotedMessage = 'Promoted Item: ' . $item->getName() . |
| 237 | - ' Price: ' . $item->getPrice() . |
|
| 238 | - ' Qty: ' . $item->getQty() . |
|
| 239 | - ' Item ID: ' . $item->getItemId(); |
|
| 237 | + ' Price: ' . $item->getPrice() . |
|
| 238 | + ' Qty: ' . $item->getQty() . |
|
| 239 | + ' Item ID: ' . $item->getItemId(); |
|
| 240 | 240 | $metadataOrder->addMetadata('promotedProduct', $promotedMessage); |
| 241 | 241 | } |
| 242 | 242 | } |
@@ -401,9 +401,9 @@ discard block |
||
| 401 | 401 | $magentoVersion = $this->productMetadataInterface->getVersion(); |
| 402 | 402 | $moduleInfo = $this->moduleList->getOne('Pagantis_Pagantis'); |
| 403 | 403 | return array( 'magento' => $magentoVersion, |
| 404 | - 'pagantis' => $moduleInfo['setup_version'], |
|
| 405 | - 'php' => phpversion(), |
|
| 406 | - 'curl' => $curlVersion); |
|
| 404 | + 'pagantis' => $moduleInfo['setup_version'], |
|
| 405 | + 'php' => phpversion(), |
|
| 406 | + 'curl' => $curlVersion); |
|
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | /** |
@@ -125,12 +125,12 @@ discard block |
||
| 125 | 125 | $customer = $quote->getCustomer(); |
| 126 | 126 | $shippingAddress = $quote->getShippingAddress(); |
| 127 | 127 | |
| 128 | - if (isset($params['email']) && $params['email']!='') { |
|
| 128 | + if (isset($params['email']) && $params['email'] != '') { |
|
| 129 | 129 | $this->session->setEmail($params['email']); //Get guest email after refresh page |
| 130 | 130 | $customer->setEmail($params['email']); |
| 131 | 131 | $quote->setCheckoutMethod('guest'); |
| 132 | 132 | $quote->getBillingAddress()->setEmail($params['email']); |
| 133 | - } elseif ($customer->getEmail()=='') { |
|
| 133 | + } elseif ($customer->getEmail() == '') { |
|
| 134 | 134 | $customer->setEmail($this->session->getEmail()); |
| 135 | 135 | $quote->setCheckoutMethod('guest'); |
| 136 | 136 | $quote->getBillingAddress()->setEmail($this->session->getEmail()); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $currentQuote->setCustomerEmail($customer->getEmail()); |
| 142 | 142 | $this->quoteRepository->save($currentQuote); |
| 143 | 143 | |
| 144 | - $userAddress = new Address(); |
|
| 144 | + $userAddress = new Address(); |
|
| 145 | 145 | $userAddress |
| 146 | 146 | ->setZipCode($shippingAddress->getPostcode()) |
| 147 | 147 | ->setFullName($shippingAddress->getFirstname()." ".$shippingAddress->getLastname()) |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | ->setTaxId($tax_id) |
| 164 | 164 | ; |
| 165 | 165 | |
| 166 | - $orderBillingAddress = new Address(); |
|
| 166 | + $orderBillingAddress = new Address(); |
|
| 167 | 167 | $billingAddress = $quote->getBillingAddress(); |
| 168 | 168 | $orderBillingAddress |
| 169 | 169 | ->setZipCode($billingAddress->getPostcode()) |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | if ($customer->getDob()) { |
| 193 | 193 | $orderUser->setDateOfBirth($customer->getDob()); |
| 194 | 194 | } |
| 195 | - if ($customer->getTaxvat()!='') { |
|
| 195 | + if ($customer->getTaxvat() != '') { |
|
| 196 | 196 | $orderUser->setDni($customer->getTaxvat()); |
| 197 | 197 | $orderBillingAddress->setDni($customer->getTaxvat()); |
| 198 | 198 | $orderShippingAddress->setDni($customer->getTaxvat()); |
@@ -232,11 +232,11 @@ discard block |
||
| 232 | 232 | |
| 233 | 233 | $promotedProduct = $this->isPromoted($item); |
| 234 | 234 | if ($promotedProduct == 'true') { |
| 235 | - $promotedAmount+=$product->getAmount()*$item->getQty(); |
|
| 236 | - $promotedMessage = 'Promoted Item: ' . $item->getName() . |
|
| 237 | - ' Price: ' . $item->getPrice() . |
|
| 238 | - ' Qty: ' . $item->getQty() . |
|
| 239 | - ' Item ID: ' . $item->getItemId(); |
|
| 235 | + $promotedAmount += $product->getAmount() * $item->getQty(); |
|
| 236 | + $promotedMessage = 'Promoted Item: '.$item->getName(). |
|
| 237 | + ' Price: '.$item->getPrice(). |
|
| 238 | + ' Qty: '.$item->getQty(). |
|
| 239 | + ' Item ID: '.$item->getItemId(); |
|
| 240 | 240 | $metadataOrder->addMetadata('promotedProduct', $promotedMessage); |
| 241 | 241 | } |
| 242 | 242 | } |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | ->setType(Channel::ONLINE) |
| 274 | 274 | ; |
| 275 | 275 | |
| 276 | - $haystack = $this->store->getLocale(); |
|
| 276 | + $haystack = $this->store->getLocale(); |
|
| 277 | 277 | $language = strstr($haystack, '_', true); |
| 278 | 278 | $orderConfiguration = new Configuration(); |
| 279 | 279 | $orderConfiguration |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | ->setUser($orderUser) |
| 292 | 292 | ; |
| 293 | 293 | |
| 294 | - if ($this->config['pagantis_public_key']=='' || $this->config['pagantis_private_key']=='') { |
|
| 294 | + if ($this->config['pagantis_public_key'] == '' || $this->config['pagantis_private_key'] == '') { |
|
| 295 | 295 | throw new \Exception('Public and Secret Key not found'); |
| 296 | 296 | } |
| 297 | 297 | |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | $displayMode = $this->extraConfig['PAGANTIS_FORM_DISPLAY_TYPE']; |
| 320 | - if ($displayMode==='0') { |
|
| 320 | + if ($displayMode === '0') { |
|
| 321 | 321 | echo $url; |
| 322 | 322 | exit; |
| 323 | 323 | } else { |
@@ -339,11 +339,11 @@ discard block |
||
| 339 | 339 | private function getOrders($customerId) |
| 340 | 340 | { |
| 341 | 341 | $orderCollection = array(); |
| 342 | - if ($customerId!='') { |
|
| 342 | + if ($customerId != '') { |
|
| 343 | 343 | $this->orderCollection->addAttributeToFilter('customer_id', $customerId) |
| 344 | 344 | ->addAttributeToFilter( |
| 345 | 345 | 'status', |
| 346 | - ['in' => ['processing','pending','complete']] |
|
| 346 | + ['in' => ['processing', 'pending', 'complete']] |
|
| 347 | 347 | ) |
| 348 | 348 | ->load(); |
| 349 | 349 | $orderCollection = $this->orderCollection->getData(); |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | $tableName = $this->dbObject->getTableName(self::ORDERS_TABLE); |
| 387 | 387 | return $dbConnection->insertOnDuplicate( |
| 388 | 388 | $tableName, |
| 389 | - array('id'=>$quoteId,'order_id'=>$pagantisOrderId), |
|
| 389 | + array('id'=>$quoteId, 'order_id'=>$pagantisOrderId), |
|
| 390 | 390 | array('order_id') |
| 391 | 391 | ); |
| 392 | 392 | } |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | $curlVersion = $curlInfo['version']; |
| 401 | 401 | $magentoVersion = $this->productMetadataInterface->getVersion(); |
| 402 | 402 | $moduleInfo = $this->moduleList->getOne('Pagantis_Pagantis'); |
| 403 | - return array( 'magento' => $magentoVersion, |
|
| 403 | + return array('magento' => $magentoVersion, |
|
| 404 | 404 | 'pagantis' => $moduleInfo['setup_version'], |
| 405 | 405 | 'php' => phpversion(), |
| 406 | 406 | 'curl' => $curlVersion); |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | foreach ($items as $key => $item) { |
| 108 | 108 | $promotedProduct = $this->isPromoted($item); |
| 109 | 109 | if ($promotedProduct == 'true') { |
| 110 | - $promotedAmount+=$item->getPrice()*$item->getQty(); |
|
| 110 | + $promotedAmount += $item->getPrice() * $item->getQty(); |
|
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | |
@@ -486,8 +486,8 @@ |
||
| 486 | 486 | $this->magentoOrder->addStatusHistoryComment($metadataInfo)->setIsCustomerNotified(false)->setEntityName('order')->save(); |
| 487 | 487 | |
| 488 | 488 | $comment = 'pagantisOrderId: ' . $this->pagantisOrder->getId(). ' ' . |
| 489 | - 'pagantisOrderStatus: '. $this->pagantisOrder->getStatus(). ' ' . |
|
| 490 | - 'via: '. $this->origin; |
|
| 489 | + 'pagantisOrderStatus: '. $this->pagantisOrder->getStatus(). ' ' . |
|
| 490 | + 'via: '. $this->origin; |
|
| 491 | 491 | $this->magentoOrder->addStatusHistoryComment($comment)->setIsCustomerNotified(false)->setEntityName('order')->save(); |
| 492 | 492 | if ($this->magentoOrderId == '') { |
| 493 | 493 | throw new UnknownException('Order can not be saved'); |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | $this->checkPagantisStatus(array('AUTHORIZED')); |
| 266 | 266 | } catch (\Exception $e) { |
| 267 | 267 | $this->getMagentoOrderId(); |
| 268 | - if ($this->magentoOrderId!='') { |
|
| 268 | + if ($this->magentoOrderId != '') { |
|
| 269 | 269 | throw new AlreadyProcessedException(); |
| 270 | 270 | } else { |
| 271 | 271 | throw new WrongStatusException($this->pagantisOrder->getStatus()); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | */ |
| 279 | 279 | private function checkMerchantOrderStatus() |
| 280 | 280 | { |
| 281 | - if ($this->quote->getIsActive()=='0') { |
|
| 281 | + if ($this->quote->getIsActive() == '0') { |
|
| 282 | 282 | $this->getMagentoOrderId(); |
| 283 | 283 | throw new AlreadyProcessedException(); |
| 284 | 284 | } |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | $tableName = $this->dbObject->getTableName(self::CONCURRENCY_TABLE); |
| 401 | 401 | if ($mode == false) { |
| 402 | 402 | $dbConnection->delete($tableName, "timestamp<".(time() - 5)); |
| 403 | - } elseif ($this->quoteId!='') { |
|
| 403 | + } elseif ($this->quoteId != '') { |
|
| 404 | 404 | $dbConnection->delete($tableName, "id=".$this->quoteId); |
| 405 | 405 | } |
| 406 | 406 | } catch (Exception $exception) { |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | /** @var \Magento\Framework\DB\Adapter\AdapterInterface $dbConnection */ |
| 456 | 456 | $dbConnection = $this->dbObject->getConnection(); |
| 457 | 457 | $tableName = $this->dbObject->getTableName(self::ORDERS_TABLE); |
| 458 | - $pagantisOrderId = $this->pagantisOrderId; |
|
| 458 | + $pagantisOrderId = $this->pagantisOrderId; |
|
| 459 | 459 | $query = "select mg_order_id from $tableName where id='$this->quoteId' and order_id='$pagantisOrderId'"; |
| 460 | 460 | $queryResult = $dbConnection->fetchRow($query); |
| 461 | 461 | $this->magentoOrderId = $queryResult['mg_order_id']; |
@@ -480,14 +480,14 @@ discard block |
||
| 480 | 480 | $metadataInfo = null; |
| 481 | 481 | foreach ($metadataOrder as $metadataKey => $metadataValue) { |
| 482 | 482 | if ($metadataKey == 'promotedProduct') { |
| 483 | - $metadataInfo.= "/Producto promocionado = $metadataValue"; |
|
| 483 | + $metadataInfo .= "/Producto promocionado = $metadataValue"; |
|
| 484 | 484 | } |
| 485 | 485 | } |
| 486 | 486 | $this->magentoOrder->addStatusHistoryComment($metadataInfo)->setIsCustomerNotified(false)->setEntityName('order')->save(); |
| 487 | 487 | |
| 488 | - $comment = 'pagantisOrderId: ' . $this->pagantisOrder->getId(). ' ' . |
|
| 489 | - 'pagantisOrderStatus: '. $this->pagantisOrder->getStatus(). ' ' . |
|
| 490 | - 'via: '. $this->origin; |
|
| 488 | + $comment = 'pagantisOrderId: '.$this->pagantisOrder->getId().' '. |
|
| 489 | + 'pagantisOrderStatus: '.$this->pagantisOrder->getStatus().' '. |
|
| 490 | + 'via: '.$this->origin; |
|
| 491 | 491 | $this->magentoOrder->addStatusHistoryComment($comment)->setIsCustomerNotified(false)->setEntityName('order')->save(); |
| 492 | 492 | if ($this->magentoOrderId == '') { |
| 493 | 493 | throw new UnknownException('Order can not be saved'); |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | /** @var \Magento\Framework\DB\Adapter\AdapterInterface $dbConnection */ |
| 507 | 507 | $dbConnection = $this->dbObject->getConnection(); |
| 508 | 508 | $tableName = $this->dbObject->getTableName(self::ORDERS_TABLE); |
| 509 | - $pagantisOrderId = $this->pagantisOrder->getId(); |
|
| 509 | + $pagantisOrderId = $this->pagantisOrder->getId(); |
|
| 510 | 510 | $dbConnection->update( |
| 511 | 511 | $tableName, |
| 512 | 512 | array('mg_order_id' => $this->magentoOrderId), |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | { |
| 540 | 540 | //$returnUrl = 'checkout/#payment'; |
| 541 | 541 | $returnUrl = $this->_url->getUrl('checkout', ['_fragment' => 'payment']); |
| 542 | - if ($this->magentoOrderId!='') { |
|
| 542 | + if ($this->magentoOrderId != '') { |
|
| 543 | 543 | /** @var Order $this->magentoOrder */ |
| 544 | 544 | $this->magentoOrder = $this->orderRepositoryInterface->get($this->magentoOrderId); |
| 545 | 545 | if (!$this->_objectManager->get(\Magento\Checkout\Model\Session\SuccessValidator::class)->isValid()) { |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | $orderStatus = strtolower($this->magentoOrder->getStatus()); |
| 557 | 557 | $acceptedStatus = array('processing', 'completed'); |
| 558 | 558 | if (in_array($orderStatus, $acceptedStatus)) { |
| 559 | - if (isset($this->extraConfig['PAGANTIS_OK_URL']) && $this->extraConfig['PAGANTIS_OK_URL']!= '') { |
|
| 559 | + if (isset($this->extraConfig['PAGANTIS_OK_URL']) && $this->extraConfig['PAGANTIS_OK_URL'] != '') { |
|
| 560 | 560 | $returnUrl = $this->extraConfig['PAGANTIS_OK_URL']; |
| 561 | 561 | } else { |
| 562 | 562 | $returnUrl = 'checkout/onepage/success'; |
@@ -489,8 +489,8 @@ |
||
| 489 | 489 | $this->magentoOrder->addStatusHistoryComment($metadataInfo)->setIsCustomerNotified(false)->setEntityName('order')->save(); |
| 490 | 490 | |
| 491 | 491 | $comment = 'pagantisOrderId: '.$this->pagantisOrder->getId(). ' ' . |
| 492 | - 'pagantisOrderStatus: '.$this->pagantisOrder->getStatus(). ' ' . |
|
| 493 | - 'via: '.$this->origin; |
|
| 492 | + 'pagantisOrderStatus: '.$this->pagantisOrder->getStatus(). ' ' . |
|
| 493 | + 'via: '.$this->origin; |
|
| 494 | 494 | $this->magentoOrder->addStatusHistoryComment($comment)->setIsCustomerNotified(false)->setEntityName('order')->save(); |
| 495 | 495 | |
| 496 | 496 | if ($this->magentoOrderId == '') { |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | $this->checkPagantisStatus(array('AUTHORIZED')); |
| 267 | 267 | } catch (\Exception $e) { |
| 268 | 268 | $this->getMagentoOrderId(); |
| 269 | - if ($this->magentoOrderId!='') { |
|
| 269 | + if ($this->magentoOrderId != '') { |
|
| 270 | 270 | throw new AlreadyProcessedException(); |
| 271 | 271 | } else { |
| 272 | 272 | throw new WrongStatusException($this->pagantisOrder->getStatus()); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | */ |
| 280 | 280 | private function checkMerchantOrderStatus() |
| 281 | 281 | { |
| 282 | - if ($this->quote->getIsActive()=='0') { |
|
| 282 | + if ($this->quote->getIsActive() == '0') { |
|
| 283 | 283 | $this->getMagentoOrderId(); |
| 284 | 284 | throw new AlreadyProcessedException(); |
| 285 | 285 | } |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | $tableName = $this->dbObject->getTableName(self::CONCURRENCY_TABLE); |
| 402 | 402 | if ($mode == false) { |
| 403 | 403 | $dbConnection->delete($tableName, "timestamp<".(time() - 5)); |
| 404 | - } elseif ($this->quoteId!='') { |
|
| 404 | + } elseif ($this->quoteId != '') { |
|
| 405 | 405 | $dbConnection->delete($tableName, "id=".$this->quoteId); |
| 406 | 406 | } |
| 407 | 407 | } catch (Exception $exception) { |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | /** @var \Magento\Framework\DB\Adapter\AdapterInterface $dbConnection */ |
| 457 | 457 | $dbConnection = $this->dbObject->getConnection(); |
| 458 | 458 | $tableName = $this->dbObject->getTableName(self::ORDERS_TABLE); |
| 459 | - $pagantisOrderId = $this->pagantisOrderId; |
|
| 459 | + $pagantisOrderId = $this->pagantisOrderId; |
|
| 460 | 460 | |
| 461 | 461 | $query = "select mg_order_id from $tableName where id='$this->quoteId' and order_id='$pagantisOrderId'"; |
| 462 | 462 | $queryResult = $dbConnection->fetchRow($query); |
@@ -483,13 +483,13 @@ discard block |
||
| 483 | 483 | $metadataInfo = null; |
| 484 | 484 | foreach ($metadataOrder as $metadataKey => $metadataValue) { |
| 485 | 485 | if ($metadataKey == 'promotedProduct') { |
| 486 | - $metadataInfo.= "/Producto promocionado = $metadataValue"; |
|
| 486 | + $metadataInfo .= "/Producto promocionado = $metadataValue"; |
|
| 487 | 487 | } |
| 488 | 488 | } |
| 489 | 489 | $this->magentoOrder->addStatusHistoryComment($metadataInfo)->setIsCustomerNotified(false)->setEntityName('order')->save(); |
| 490 | 490 | |
| 491 | - $comment = 'pagantisOrderId: '.$this->pagantisOrder->getId(). ' ' . |
|
| 492 | - 'pagantisOrderStatus: '.$this->pagantisOrder->getStatus(). ' ' . |
|
| 491 | + $comment = 'pagantisOrderId: '.$this->pagantisOrder->getId().' '. |
|
| 492 | + 'pagantisOrderStatus: '.$this->pagantisOrder->getStatus().' '. |
|
| 493 | 493 | 'via: '.$this->origin; |
| 494 | 494 | $this->magentoOrder->addStatusHistoryComment($comment)->setIsCustomerNotified(false)->setEntityName('order')->save(); |
| 495 | 495 | |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | /** @var \Magento\Framework\DB\Adapter\AdapterInterface $dbConnection */ |
| 511 | 511 | $dbConnection = $this->dbObject->getConnection(); |
| 512 | 512 | $tableName = $this->dbObject->getTableName(self::ORDERS_TABLE); |
| 513 | - $pagantisOrderId = $this->pagantisOrder->getId(); |
|
| 513 | + $pagantisOrderId = $this->pagantisOrder->getId(); |
|
| 514 | 514 | $dbConnection->update( |
| 515 | 515 | $tableName, |
| 516 | 516 | array('mg_order_id' => $this->magentoOrderId), |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | { |
| 544 | 544 | //$returnUrl = 'checkout/#payment'; |
| 545 | 545 | $returnUrl = $this->_url->getUrl('checkout', ['_fragment' => 'payment']); |
| 546 | - if ($this->magentoOrderId!='') { |
|
| 546 | + if ($this->magentoOrderId != '') { |
|
| 547 | 547 | /** @var Order $this->magentoOrder */ |
| 548 | 548 | $this->magentoOrder = $this->orderRepositoryInterface->get($this->magentoOrderId); |
| 549 | 549 | if (!$this->_objectManager->get(\Magento\Checkout\Model\Session\SuccessValidator::class)->isValid()) { |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | $orderStatus = strtolower($this->magentoOrder->getStatus()); |
| 561 | 561 | $acceptedStatus = array('processing', 'completed'); |
| 562 | 562 | if (in_array($orderStatus, $acceptedStatus)) { |
| 563 | - if (isset($this->extraConfig['PAGANTIS_OK_URL']) && $this->extraConfig['PAGANTIS_OK_URL']!= '') { |
|
| 563 | + if (isset($this->extraConfig['PAGANTIS_OK_URL']) && $this->extraConfig['PAGANTIS_OK_URL'] != '') { |
|
| 564 | 564 | $returnUrl = $this->extraConfig['PAGANTIS_OK_URL']; |
| 565 | 565 | } else { |
| 566 | 566 | $returnUrl = 'checkout/onepage/success'; |