protected function _processResult($aResult, $oUser, $oBasket)
    {
        $oConfig = $this->_getContainer()->getConfig();
        $sClass = $oConfig->getRequestParameter('cl');
        $sAmazonOrderReferenceId = $this->_getContainer()->getSession()->getVariable('amazonOrderReferenceId');

        //If Amazon Pay cannot be selected remove it from payments list
        if ($sClass === 'payment') {
            if ($this->_getContainer()->getModule()->isActive() !== true) {
                unset($aResult[2]['bestitamazon']);
                return $aResult;
            }

            //If Amazon pay was selected with the button before leave only bestitamazon as payment selection
            if ($oUser !== false
                && isset($aResult[2]['bestitamazon'])
                && $sAmazonOrderReferenceId !== null
            ) {
                //If Amazon pay was selected remove other payment options and leave only Amazon pay
                $aResult[2] = array('bestitamazon' => $aResult[2]['bestitamazon']);

                //If Amazon pay was selected remove shipping options where Amazon pay is not assigned
                foreach ($aResult[0] as $sKey => $sValue) {
                    if ($this->_getShippingAvailableForPayment($sKey) !== true) {
                        unset($aResult[0][$sKey]);
                    }
                }
            }
        }

        //If Amazon pay was not selected within the button click in 1st, 2nd step of checkout
        //check if selected currency is available for selected Amazon locale, if not remove amazon pay option from payments
        if ($sAmazonOrderReferenceId === null
            && ($this->_getContainer()->getModule()->getIsSelectedCurrencyAvailable() === false
                || $oBasket->getPrice()->getBruttoPrice() === 0
                || ((bool)$oConfig->getConfigParam('blAmazonLoginActive') === true
                    && $this->_getContainer()->getLoginClient()->showAmazonPayButton() === false)
            )
        ) {
            unset($aResult[2]['bestitamazon']);
        }

        return $aResult;
    }