application/models/bestitamazonpay4oxidbasketutil.php
public function getBasketHash($sAmazonOrderReferenceId, $oBasket)
    {
        $aBasket = array(
            'amazonOrderReferenceId' => $sAmazonOrderReferenceId,
            'totalSum' => $oBasket->getBruttoSum(),
            'contents' => array()
        );

        /** @var oxBasketItem $oBasketItem */
        foreach ($oBasket->getContents() as $oBasketItem) {
            $sId = $oBasketItem->getArticle()->getId();
            $aBasket['contents'][$sId] = $oBasketItem->getAmount();
        }

        return md5(json_encode($aBasket));
    }
public function getBasketHash($sAmazonOrderReferenceId, $oBasket)
    {
        $aBasket = array(
            'amazonOrderReferenceId' => $sAmazonOrderReferenceId,
            'totalSum' => $oBasket->getBruttoSum(),
            'contents' => array()
        );

        /** @var oxBasketItem $oBasketItem */
        foreach ($oBasket->getContents() as $oBasketItem) {
            $sId = $oBasketItem->getArticle()->getId();
            $aBasket['contents'][$sId] = $oBasketItem->getAmount();
        }

        return md5(json_encode($aBasket));
    }
public function getBasketHash ( $ sAmazonOrderReferenceId , $ oBasket ) { $ aBasket = array ( 'amazonOrderReferenceId' => $ sAmazonOrderReferenceId , 'totalSum' => $ oBasket -> getBruttoSum ( ) , 'contents' => array ( ) ) ; /** @var oxBasketItem $oBasketItem */ foreach ( $ oBasket -> getContents ( ) as $ oBasketItem ) { $ sId = $ oBasketItem -> getArticle ( ) -> getId ( ) ; $ aBasket [ 'contents' ] [ $ sId ] = $ oBasketItem -> getAmount ( ) ; } return md5 ( json_encode ( $ aBasket ) ) ; }
Generates the basket hash.

@param string          $sAmazonOrderReferenceId
@param oxBasket|\OxidEsales\Eshop\Application\Model\Basket $oBasket

@return string

@throws oxArticleException
@throws oxArticleInputException
@throws oxNoArticleException
Generates the basket hash .