@@ -465,12 +465,12 @@ |
||
465 | 465 | $minAmount = $this->getMinAmount(); |
466 | 466 | $finalPrice = $this->getFinalPrice(); |
467 | 467 | |
468 | - if (isset($maxAmount, $minAmount, $finalPrice) && $maxAmount!='0') { |
|
469 | - if ($finalPrice>=$minAmount && $finalPrice<=$maxAmount) { |
|
468 | + if (isset($maxAmount, $minAmount, $finalPrice) && $maxAmount != '0') { |
|
469 | + if ($finalPrice >= $minAmount && $finalPrice <= $maxAmount) { |
|
470 | 470 | $isValid = true; |
471 | 471 | } |
472 | - } elseif (isset($minAmount, $finalPrice) && $maxAmount=='0') { |
|
473 | - if ($finalPrice>=$minAmount) { |
|
472 | + } elseif (isset($minAmount, $finalPrice) && $maxAmount == '0') { |
|
473 | + if ($finalPrice >= $minAmount) { |
|
474 | 474 | $isValid = true; |
475 | 475 | } |
476 | 476 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | public function execute(\Magento\Framework\Event\Observer $observer) |
17 | 17 | { |
18 | 18 | try { |
19 | - if ($observer->getEvent()->getMethodInstance()->getCode()=="pagantis") { |
|
19 | + if ($observer->getEvent()->getMethodInstance()->getCode() == "pagantis") { |
|
20 | 20 | $checkResult = $observer->getEvent()->getResult(); |
21 | 21 | $totalPrice = (string) floor($observer->getEvent()->getQuote()->getGrandTotal()); |
22 | 22 | $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $availableCountry = (in_array(strtolower($locale), $allowedCountries)); |
29 | 29 | $maxAmount = $extraConfig['PAGANTIS_DISPLAY_MAX_AMOUNT']; |
30 | 30 | $minAmount = $extraConfig['PAGANTIS_DISPLAY_MIN_AMOUNT']; |
31 | - $validAmount = ($totalPrice>=$minAmount && ($totalPrice<=$maxAmount||$maxAmount=='0')); |
|
31 | + $validAmount = ($totalPrice >= $minAmount && ($totalPrice <= $maxAmount || $maxAmount == '0')); |
|
32 | 32 | if (!isset($config['pagantis_public_key']) || $config['pagantis_public_key'] == '' || |
33 | 33 | !isset($config['pagantis_private_key']) || $config['pagantis_private_key'] == '' || |
34 | 34 | !$availableCountry || !$validAmount) { |