application/models/bestitamazonpay4oxid.php
public function getIsSelectedCurrencyAvailable()
    {
        $oConfig = $this->getConfig();
        $blEnableMultiCurrency = (bool)$oConfig->getConfigParam('blBestitAmazonPay4OxidEnableMultiCurrency');

        if ($blEnableMultiCurrency === true) {
            return true;
        }

        if ($this->_isSelectedCurrencyAvailable === null) {
            $this->_isSelectedCurrencyAvailable = true;

            $aMap = array(
                'DE' => 'EUR',
                'UK' => 'GBP',
                'US' => 'USD'
            );
            $sLocale = (string)$oConfig->getConfigParam('sAmazonLocale');
            $sCurrency = (string)$this->getSession()->getBasket()->getBasketCurrency()->name;

            //If Locale is DE and currency is not EURO don't allow Amazon checkout process
            if (isset($aMap[$sLocale]) && $aMap[$sLocale] !== $sCurrency) {
                $this->_isSelectedCurrencyAvailable = false;
            }
        }

        return $this->_isSelectedCurrencyAvailable;
    }
public function getIsSelectedCurrencyAvailable()
    {
        $oConfig = $this->getConfig();
        $blEnableMultiCurrency = (bool)$oConfig->getConfigParam('blBestitAmazonPay4OxidEnableMultiCurrency');

        if ($blEnableMultiCurrency === true) {
            return true;
        }

        if ($this->_isSelectedCurrencyAvailable === null) {
            $this->_isSelectedCurrencyAvailable = true;

            $aMap = array(
                'DE' => 'EUR',
                'UK' => 'GBP',
                'US' => 'USD'
            );
            $sLocale = (string)$oConfig->getConfigParam('sAmazonLocale');
            $sCurrency = (string)$this->getSession()->getBasket()->getBasketCurrency()->name;

            //If Locale is DE and currency is not EURO don't allow Amazon checkout process
            if (isset($aMap[$sLocale]) && $aMap[$sLocale] !== $sCurrency) {
                $this->_isSelectedCurrencyAvailable = false;
            }
        }

        return $this->_isSelectedCurrencyAvailable;
    }
public function getIsSelectedCurrencyAvailable ( ) { $ oConfig = $ this -> getConfig ( ) ; $ blEnableMultiCurrency = ( bool ) $ oConfig -> getConfigParam ( 'blBestitAmazonPay4OxidEnableMultiCurrency' ) ; if ( $ blEnableMultiCurrency === true ) { return true ; } if ( $ this -> _isSelectedCurrencyAvailable === null ) { $ this -> _isSelectedCurrencyAvailable = true ; $ aMap = array ( 'DE' => 'EUR' , 'UK' => 'GBP' , 'US' => 'USD' ) ; $ sLocale = ( string ) $ oConfig -> getConfigParam ( 'sAmazonLocale' ) ; $ sCurrency = ( string ) $ this -> getSession ( ) -> getBasket ( ) -> getBasketCurrency ( ) -> name ; //If Locale is DE and currency is not EURO don't allow Amazon checkout process if ( isset ( $ aMap [ $ sLocale ] ) && $ aMap [ $ sLocale ] !== $ sCurrency ) { $ this -> _isSelectedCurrencyAvailable = false ; } } return $ this -> _isSelectedCurrencyAvailable ; }
Returns true if currency meets locale

@return boolean
Returns true if currency meets locale