Controller/ExpressCheckoutDispatcher.php
protected function extractShippingId($shippingOptionName, $user)
    {
        $result = null;

        $charset = $this->getPayPalConfig()->getCharset();
        $shippingOptionName = htmlentities(html_entity_decode($shippingOptionName, ENT_QUOTES, $charset), ENT_QUOTES, $charset);

        $name = trim(str_replace(\OxidEsales\Eshop\Core\Registry::getLang()->translateString("OEPAYPAL_PRICE"), "", $shippingOptionName));

        $deliverySetList = $this->getSession()->getVariable("oepaypal-oxDelSetList");

        if (!$deliverySetList) {
            $delSetList = $this->getDeliverySetList($user);
            $deliverySetList = $this->makeUniqueNames($delSetList);
        }

        if (is_array($deliverySetList)) {
            $flipped = array_flip($deliverySetList);

            $result = $flipped[$name];
        }

        return $result;
    }
protected function extractShippingId($shippingOptionName, $user)
    {
        $result = null;

        $charset = $this->getPayPalConfig()->getCharset();
        $shippingOptionName = htmlentities(html_entity_decode($shippingOptionName, ENT_QUOTES, $charset), ENT_QUOTES, $charset);

        $name = trim(str_replace(\OxidEsales\Eshop\Core\Registry::getLang()->translateString("OEPAYPAL_PRICE"), "", $shippingOptionName));

        $deliverySetList = $this->getSession()->getVariable("oepaypal-oxDelSetList");

        if (!$deliverySetList) {
            $delSetList = $this->getDeliverySetList($user);
            $deliverySetList = $this->makeUniqueNames($delSetList);
        }

        if (is_array($deliverySetList)) {
            $flipped = array_flip($deliverySetList);

            $result = $flipped[$name];
        }

        return $result;
    }
protected function extractShippingId ( $ shippingOptionName , $ user ) { $ result = null ; $ charset = $ this -> getPayPalConfig ( ) -> getCharset ( ) ; $ shippingOptionName = htmlentities ( html_entity_decode ( $ shippingOptionName , ENT_QUOTES , $ charset ) , ENT_QUOTES , $ charset ) ; $ name = trim ( str_replace ( \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) -> translateString ( "OEPAYPAL_PRICE" ) , "" , $ shippingOptionName ) ) ; $ deliverySetList = $ this -> getSession ( ) -> getVariable ( "oepaypal-oxDelSetList" ) ; if ( ! $ deliverySetList ) { $ delSetList = $ this -> getDeliverySetList ( $ user ) ; $ deliverySetList = $ this -> makeUniqueNames ( $ delSetList ) ; } if ( is_array ( $ deliverySetList ) ) { $ flipped = array_flip ( $ deliverySetList ) ; $ result = $ flipped [ $ name ] ; } return $ result ; }
Extracts shipping id from given parameter

@param string                                   $shippingOptionName Shipping option name, which comes from PayPal.
@param \OxidEsales\Eshop\Application\Model\User $user               User object.

@return string
Extracts shipping id from given parameter