return the URL to the IFrame we call in order for paypal to collect the data.

@param string $sMessageConsumer - the name of the message handler that can display messages if an error occurs (assuming you return false)

@return string
165849
protected function CallPayPalExpressCheckout($sMessageConsumer)
    {
        $oGlobal = TGlobal::instance();

        $sReturnURLBase = $this->getActivePageService()->getActivePage()->GetRealURLPlain(array(), true);
        if ('.html' == substr($sReturnURLBase, -5)) {
            $sReturnURLBase = substr($sReturnURLBase, 0, -5);
        }
        if ('/' != substr($sReturnURLBase, -1)) {
            $sReturnURLBase .= '/';
        }
        $sSuccessURL = $sReturnURLBase.self::URL_IDENTIFIER.'success/spot_'.$oGlobal->GetExecutingModulePointer()->sModuleSpotName;
        $sCancelURL = $sReturnURLBase.self::URL_IDENTIFIER.'cancel/spot_'.$oGlobal->GetExecutingModulePointer()->sModuleSpotName;

        $oBasket = TShopBasket::GetInstance();

        $aParameter = array();
        $aParameter['PAYMENTREQUEST_0_AMT'] = number_format($oBasket->dCostTotal, 2); // the total value to charge (use US-Format (1000.00)
        $aParameter['PAYMENTREQUEST_0_CURRENCYCODE'] = $this->GetCurrencyIdentifier();
        $aParameter['RETURNURL'] = $sSuccessURL; // go to the checkout complete page
        $aParameter['CANCELURL'] = $sCancelURL; //urldecode(str_replace('&amp;','&',$oActivePage->GetRealURL(array('paypalreturn'=>'1'),$aExcludes,true))); // return to the cancel page

        // styling
        $aParameter['HDRIMG'] = ''; // - : specify an image to appear at the top left of the payment page
        $aParameter['HDRBORDERCOLOR'] = ''; // - : set the border color around the header of the payment page
        $aParameter['HDRBACKCOLOR'] = ''; // - : set the background color for the background of the header of the payment page
        $aParameter['PAYFLOWCOLOR'] = ''; // - : set the background color for the payment page

        //$aParameter['notify_url'] = $this->GetInstantPaymentNotificationListenerURL(); // instant payment notification url

        $logger = $this->getPaypalLogger();

        $logger->info('Parameters sent to the PayPal API', $aParameter);
        $aResponse = $this->ExecutePayPalCall('SetExpressCheckout', $aParameter);

        $sSuccess = false;
        // store relevant data in session - and redirect to paypal
        if (array_key_exists('ACK', $aResponse)) {
            $sAckResponse = strtoupper($aResponse['ACK']);
            if ('SUCCESS' == $sAckResponse) {
                $this->sPayPalToken = urldecode($aResponse['TOKEN']);
                $payPalURL = $this->GetConfigParameter('url').'?cmd=_express-checkout&token='.$this->sPayPalToken;
                $this->getRedirect()->redirect($payPalURL);
                $sSuccess = true;
            }
        }
        if (!$sSuccess) {
            $sResponse = self::GetPayPalErrorMessage($aResponse);
            $logger->critical('PayPal payment could not be initiated.', array($sResponse));

            $oMsgManager = TCMSMessageManager::GetInstance();
            $oMsgManager->AddMessage($sMessageConsumer, 'ERROR-ORDER-REQUEST-PAYMENT-ERROR', array('errorMsg' => 'Error Number: '.$aResponse['L_ERRORCODE0']));
        }

        return $sSuccess;
    }
1291877
protected function GetNextAvailableVoucher($sVoucherCode, $sSeriesId, $sMessageConsumer)
    {
        $oNextAvailableVoucher = null;
        $oVoucher = TdbShopVoucher::GetNewInstance();
        if ($oVoucher->LoadFromFields(array('code' => $sVoucherCode, 'is_used_up' => '0', 'shop_voucher_series_id' => $sSeriesId))) {
            $oNextAvailableVoucher = $oVoucher;
        }

        return $oNextAvailableVoucher;
    }
900837
public function getRedirectUrl()
    {
        // Build the request
        $id = $this->_generateUniqueID();
        $issueInstant = $this->_getTimestamp();

        $request = <<<AUTHNREQUEST
<samlp:AuthnRequest
    xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
    ID="$id"
    Version="2.0"
    IssueInstant="$issueInstant"
    ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
    AssertionConsumerServiceURL="{$this->_settings->spReturnUrl}">
    <saml:Issuer>{$this->_settings->spIssuer}</saml:Issuer>
    <samlp:NameIDPolicy
        Format="{$this->_settings->requestedNameIdFormat}"
        AllowCreate="true"></samlp:NameIDPolicy>
    <samlp:RequestedAuthnContext Comparison="exact">
        <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
    </samlp:RequestedAuthnContext>
</samlp:AuthnRequest>
AUTHNREQUEST;

        // Encode the request
        $deflatedRequest = gzdeflate($request);
        $base64Request = base64_encode($deflatedRequest);
        $encodedRequest = urlencode($base64Request);

        // Build redirect URL
        $url = $this->_settings->idpSingleSignOnUrl . "?SAMLRequest=" . $encodedRequest;

        // Keep the original GET parameters
        foreach ($this->_get_params as $param => $value) {
            $url .= "&" . $param . "=" . urlencode($value);
        }

        return $url;
    }
562227
public function RemoveVoucher($sBasketVoucherKey, $sMessageHandler)
    {
        $bRemoved = $this->GetActiveVouchers()->RemoveItem('sBasketVoucherKey', $sBasketVoucherKey);
        $oMessageManager = TCMSMessageManager::GetInstance();
        if ($bRemoved) {
            $oMessageManager->AddMessage($sMessageHandler, 'VOUCHER-REMOVED');
            $this->SetBasketRecalculationFlag();
        } else {
            $oMessageManager->AddMessage($sMessageHandler, 'VOUCHER-ERROR-NOT-FOUND');
        }

        return $bRemoved;
    }
791249
public function GetToNoticeListLink($bIncludePortalLink = false, $sMsgConsumerName = false)
    {
        if (false === $sMsgConsumerName) {
            $sMsgConsumerName = $this->GetMessageConsumerName();
        }
        $oShopConfig = TdbShop::GetInstance();

        $aParameters = array(
            'module_fnc' => array(
                $oShopConfig->GetBasketModuleSpotName() => 'AddToNoticeList',
            ),
            MTShopBasketCore::URL_ITEM_ID => $this->id,
            MTShopBasketCore::URL_ITEM_AMOUNT => 1,
            MTShopBasketCore::URL_MESSAGE_CONSUMER => $sMsgConsumerName,
        );

        $aExcludeParameters = TCMSSmartURLData::GetActive()->getSeoURLParameters();

        foreach ($aParameters as $sKey => $sVal) {
            $aExcludeParameters[] = $sKey;
        }

        // now add all OTHER parameters
        $aOtherParameters = TGlobal::instance()->GetUserData(null, $aExcludeParameters);
        foreach ($aOtherParameters as $sKey => $sVal) {
            $aParameters[$sKey] = $sVal;
        }

        $activePage = $this->getActivePageService()->getActivePage();

        return $activePage->GetRealURLPlain($aParameters, $bIncludePortalLink);
    }
859994
def _get_url(cls, name, message_model, dispatch_model):
        
        global APP_URLS_ATTACHED

        url = ''

        if dispatch_model is None:
            return url

        if APP_URLS_ATTACHED != False:  # sic!

            hashed = cls.get_dispatch_hash(dispatch_model.id, message_model.id)

            try:
                url = reverse(name, args=[message_model.id, dispatch_model.id, hashed])
                url = '%s%s' % (get_site_url(), url)
            except NoReverseMatch:
                if APP_URLS_ATTACHED is None:
                    APP_URLS_ATTACHED = False

        return url
775484
private function validateBasketContentBuyable(TShopBasketArticle $oBasketArticle, $sMessageManager)
    {
        $bValid = true;
        if (false === $oBasketArticle->IsBuyable()) {
            $oMessage = TCMSMessageManager::GetInstance();
            $aErrorCodes = $oBasketArticle->GetSQLWithTablePrefix();
            $oMessage->AddMessage($sMessageManager, 'ERROR-ADD-TO-BASKET-ARTICLE-NOT-BUYABLE', $aErrorCodes);
            if ($this->IsInList($oBasketArticle)) {
                $this->RemoveArticle($oBasketArticle);
            }
            $bValid = false;
        }

        return $bValid;
    }
1093321
public function getMediaUrl($sFile = '')
    {
        $oConfig = $this->getConfig();

        $sFilePath = $this->getMediaPath($sFile);

        if (!is_readable($sFilePath)) {
            return false;
        }

        if ($oConfig->isSsl()) {
            $sUrl = $oConfig->getSslShopUrl(false);
        } else {
            $sUrl = $oConfig->getShopUrl(false);
        }

        $sUrl = rtrim($sUrl, '/') . $this->_sMediaPath;

        if ($sFile) {
            return $sUrl . $sFile;
        }

        return $sUrl;
    }
935094
public function getReferrer(): ?UrlInterface
    {
        $referrerHeader = $this->getHeader('Referer');
        if ($referrerHeader === null) {
            return null;
        }

        return Url::tryParse($referrerHeader);
    }
144113
public function asUrl($appSecret = null)
    {
        $this->resetCompiledValues();

        if ($appSecret) {
            $this->addAppSecretProofModifier($appSecret);
        }

        $this->compileModifiers();
        $this->compileFields();

        return $this->compileUrl();
    }
1118792
public function getPayPalSandboxUrl()
    {
        $url = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sPayPalSandboxUrl');
        if ($url) {
            $this->setPayPalSandboxUrl($url);
        }

        return $this->payPalSandboxUrl;
    }
382500
public function getModuleUrl($sModule, $sFile = '')
    {
        $c = $this->getConfig();
        $shopUrl = null;
        if ($this->isAdmin()) {
            if ($c->isSsl()) {
                // From admin and with SSL we try to use sAdminSSLURL config directive
                $shopUrl = $c->getConfigParam('sAdminSSLURL');
                if ($shopUrl) {
                    // but we don't need the admin directory
                    $adminDir = '/'.$c->getConfigParam('sAdminDir');
                    $shopUrl = substr($shopUrl, 0, -strlen($adminDir));
                } else {
                    // if no sAdminSSLURL directive were defined we use sSSLShopURL config directive instead
                    $shopUrl = $c->getConfigParam('sSSLShopURL');
                }
            }
            // From admin and with no config usefull directive, we use the sShopURL directive
            if (!$shopUrl) {
                $shopUrl = $c->getConfigParam('sShopURL');
            }
        }
        // We are either in front, or in admin with no $sShopURL defined
        if (!$shopUrl) {
            $shopUrl = $c->getCurrentShopUrl();
        }
        $shopUrl = rtrim($shopUrl, '/');

        $sUrl = str_replace(
            rtrim($c->getConfigParam('sShopDir'), '/'),
            $shopUrl,
            $this->getModulePath($sModule, $sFile)
        );

        return $sUrl;
    }
161415
protected function GetMessageForField($sFieldName, $sCustomMSGConsumer)
    {
        $sMessage = '';
        $oMsgManager = TCMSMessageManager::GetInstance();
        if ($oMsgManager->ConsumerHasMessages($sCustomMSGConsumer.'-'.$sFieldName)) {
            $sMessage = $oMsgManager->RenderMessages($sCustomMSGConsumer.'-'.$sFieldName);
        }

        return $sMessage;
    }
1156512
public function getIconUrl()
    {
        // icon url must be (re)loaded in case icon is not set or shop was switched between ssl/nonssl
        if ($this->_sIconUrl === null || $this->_blSsl != \OxidEsales\Eshop\Core\Registry::getConfig()->isSsl()) {
            $this->_sIconUrl = $this->getArticle()->getIconUrl();
        }

        return $this->_sIconUrl;
    }
573121
public function getTopicUrl(Tag $tag, array $parameters = [], bool $schemeRelative = false): string
    {
        return $this->topicUrlGenerator->generate(
            $tag,
            $parameters,
            $schemeRelative ?
                UrlGeneratorInterface::NETWORK_PATH :
                UrlGeneratorInterface::ABSOLUTE_URL
        );
    }
376757
public function getUrl(ContentInterface $content, $originUrl = true)
    {
        if (!$info = $content->getPathInfo()) {
            return;
        }
        $router = $this->getRouter();

        try {
            $parameters = $info['__defaults'];
            foreach ($info as $key => $value) {
                if (strpos($key, '_') === 0) {
                    continue;
                }
                $parameters[$key] = $value;
            }
            if ($originUrl) {
                $parameters[UrlGenerator::GENERATE_NORMAL_ROUTE] = true;
            }

            return $router->generate($info['_route'], $parameters);
        } catch (\Exception $e) {
            return $e->getMessage();
        }
    }
662465
protected function GetMessages($aMessageConsumerToCheck)
    {
        $sMessages = '';
        $oMsgManager = TCMSMessageManager::GetInstance();

        foreach ($aMessageConsumerToCheck as $sMessageConsumer) {
            if ($oMsgManager->ConsumerHasMessages($sMessageConsumer)) {
                $sMessages .= $oMsgManager->RenderMessages($sMessageConsumer);
            }
        }

        return $sMessages;
    }