ext/bestitamazonpay4oxid_oxcmp_basket.php
public function tobasket(
        $sProductId = null,
        $dAmount = null,
        $aSelectList = null,
        $aPersistentParameters = null,
        $blOverride = false
    ) {
        $oContainer = $this->_getContainer();
        $oConfig = $oContainer->getConfig();
        $isAmazonPay = (bool)$oConfig->getRequestParameter('bestitAmazonPayIsAmazonPay');
        $sReturn = null;

        if ($isAmazonPay === true) {
            $oContainer->getBasketUtil()->setQuickCheckoutBasket();
            $sAmazonOrderReferenceId = $oConfig->getRequestParameter('amazonOrderReferenceId');
            $sAccessToken = $oConfig->getRequestParameter('access_token');
            $sReturn = 'user?fnc=amazonLogin&redirectCl=user&amazonOrderReferenceId='.$sAmazonOrderReferenceId
                .'&access_token='.$sAccessToken;
        }

        $sDefaultReturn = $this->_parentToBasket(
            $sProductId,
            $dAmount,
            $aSelectList,
            $aPersistentParameters,
            $blOverride
        );

        if ($isAmazonPay === true) {
            $oSession = $oContainer->getSession();
            $oSession->setVariable('blAddedNewItem', false);
            $oSession->setVariable('isAmazonPayQuickCheckout', true);
            return $sReturn;
        }

        return $sDefaultReturn;
    }
public function tobasket(
        $sProductId = null,
        $dAmount = null,
        $aSelectList = null,
        $aPersistentParameters = null,
        $blOverride = false
    ) {
        $oContainer = $this->_getContainer();
        $oConfig = $oContainer->getConfig();
        $isAmazonPay = (bool)$oConfig->getRequestParameter('bestitAmazonPayIsAmazonPay');
        $sReturn = null;

        if ($isAmazonPay === true) {
            $oContainer->getBasketUtil()->setQuickCheckoutBasket();
            $sAmazonOrderReferenceId = $oConfig->getRequestParameter('amazonOrderReferenceId');
            $sAccessToken = $oConfig->getRequestParameter('access_token');
            $sReturn = 'user?fnc=amazonLogin&redirectCl=user&amazonOrderReferenceId='.$sAmazonOrderReferenceId
                .'&access_token='.$sAccessToken;
        }

        $sDefaultReturn = $this->_parentToBasket(
            $sProductId,
            $dAmount,
            $aSelectList,
            $aPersistentParameters,
            $blOverride
        );

        if ($isAmazonPay === true) {
            $oSession = $oContainer->getSession();
            $oSession->setVariable('blAddedNewItem', false);
            $oSession->setVariable('isAmazonPayQuickCheckout', true);
            return $sReturn;
        }

        return $sDefaultReturn;
    }
public function tobasket ( $ sProductId = null , $ dAmount = null , $ aSelectList = null , $ aPersistentParameters = null , $ blOverride = false ) { $ oContainer = $ this -> _getContainer ( ) ; $ oConfig = $ oContainer -> getConfig ( ) ; $ isAmazonPay = ( bool ) $ oConfig -> getRequestParameter ( 'bestitAmazonPayIsAmazonPay' ) ; $ sReturn = null ; if ( $ isAmazonPay === true ) { $ oContainer -> getBasketUtil ( ) -> setQuickCheckoutBasket ( ) ; $ sAmazonOrderReferenceId = $ oConfig -> getRequestParameter ( 'amazonOrderReferenceId' ) ; $ sAccessToken = $ oConfig -> getRequestParameter ( 'access_token' ) ; $ sReturn = 'user?fnc=amazonLogin&redirectCl=user&amazonOrderReferenceId=' . $ sAmazonOrderReferenceId . '&access_token=' . $ sAccessToken ; } $ sDefaultReturn = $ this -> _parentToBasket ( $ sProductId , $ dAmount , $ aSelectList , $ aPersistentParameters , $ blOverride ) ; if ( $ isAmazonPay === true ) { $ oSession = $ oContainer -> getSession ( ) ; $ oSession -> setVariable ( 'blAddedNewItem' , false ) ; $ oSession -> setVariable ( 'isAmazonPayQuickCheckout' , true ) ; return $ sReturn ; } return $ sDefaultReturn ; }
Check if we are using amazon quick checkout.

@param null|string $sProductId
@param null|float $dAmount
@param null|array $aSelectList
@param null|array $aPersistentParameters
@param bool $blOverride

@return mixed
@throws oxSystemComponentException
Check if we are using amazon quick checkout .