Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
namespace Cybage\CodExtracharge\Helper;

use \Magento\Framework\App\Helper\AbstractHelper;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Store\Model\ScopeInterface;

/**
Expand All @@ -46,25 +45,15 @@ class Data extends AbstractHelper
/* @const COD countrywise enable*/
const XML_COD_COUNTRYWISE_ENABLE = 'payment/cashondelivery/cyb_cod_countrywise_enable';

/**
* Constructor
*
* @param ScopeConfigInterface $scopeConfigInterface
*/
public function __construct(
ScopeConfigInterface $scopeConfigInterface
) {
$this->scopeConfigInterface = $scopeConfigInterface;
}

/**
* Get Cod extra charge amount
*
* @return type float
* @return mixed
*/
public function getCybCodAmount()
{
return $this->scopeConfigInterface->getValue(
return $this->scopeConfig->getValue(
self::XML_COD_AMT,
ScopeInterface::SCOPE_WEBSITE
);
Expand All @@ -73,23 +62,23 @@ public function getCybCodAmount()
/**
* Get label for cod extra charge
*
* @return type
* @return mixed
*/
public function getCybCodLabel()
{
return $this->scopeConfigInterface->getValue(
return $this->scopeConfig->getValue(
self::XML_COD_LABEL,
ScopeInterface::SCOPE_WEBSITE
);
}

/**
* Get cod enable by countrywise
* @return type
* @return mixed
*/
public function getCountrywiseCodEnableStatus()
{
return $this->scopeConfigInterface->getValue(
return $this->scopeConfig->getValue(
self::XML_COD_COUNTRYWISE_ENABLE,
ScopeInterface::SCOPE_WEBSITE
);
Expand Down