Get gateway url for current gateway mode

@return      string      Sandbox gateway url if gateway mode is sandbox,
production gateway url if gateway mode is production
545730
public function getGatewayUrl()
    {
        switch ($this->getGatewayMode())
        {
            case self::GATEWAY_MODE_SANDBOX:
            {
                return $this->getGatewayUrlSandbox();
            }
            case self::GATEWAY_MODE_PRODUCTION:
            {
                return $this->getGatewayUrlProduction();
            }
            default:
            {
                throw new RuntimeException('You must set gatewayMode property first');
            }
        }
    }
525136
public function getBaseUrl() : string
    {
        // Current Request URI
        $this->currentUrl = $this->server->get('REQUEST_URI');

        // Remove rewrite base path (= allows one to run the router in a sub folder)
        $basePath = implode('/', array_slice(explode('/', $this->server->get('SCRIPT_NAME')), 0, -1)).'/';

        return $basePath;
    }
1347902
public function get_return_url() {
        global $CFG;
        return $CFG->wwwroot . '/mod/' . $this->cm->modname . '/view.php?id=' . $this->cm->id;
    }
1224343
public function getCurrentUrl() {
        $script = self::getScriptName();
        if ( $script === false ) return false; 
        $pieces = $this->apphome;
        if ( $this->apphome ) {
            $pieces = parse_url($this->apphome);
        }
        // We only take scheme, host, and port from wwwroot / apphome
        if ( ! isset($pieces['scheme']) ) return false;
        $retval = $pieces['scheme'].'://'.$pieces['host'];
        if ( isset($pieces['port']) ) $retval .= ':'.$pieces['port'];
        return $retval . $script;
    }
497510
public static function getCurrentPath()
    {
        if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
            $url = $_SERVER['HTTP_X_REWRITE_URL'];
        } elseif (isset($_SERVER['REQUEST_URI'])) {
            $url = $_SERVER['REQUEST_URI'];
        } elseif (isset($_SERVER['ORIG_PATH_INFO'])) {
            $url = $_SERVER['ORIG_PATH_INFO'] . (!empty($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '');
        } else {
            $url = '';
        }

        return strpos($url, '?') ? strstr($url, '?', true) : $url;
    }
1366107
protected function getCallingUrl()
    {
        $oGlobal = TGlobal::instance();
        $sCallingURL = $oGlobal->GetUserData('sourceurl');
        if (true === empty($sCallingURL)) {
            //the method will most likely be called on a basket page, in this case, ignore it...
            $activePageService = $this->getActivePageService();
            $oActivePage = $activePageService->getActivePage();
            $checkoutSystemPage = $this->getSystemPageService()->getSystemPage('checkout');
            if (null === $checkoutSystemPage || $checkoutSystemPage->fieldCmsTreeId !== $oActivePage->GetMainTreeId()) {
                $aExcludeParams = array('module_fnc');
                // we may be on a category list or an item page... so ignore those parameters, too
                $aExcludeParams[] = MTShopArticleCatalogCore::URL_CATEGORY_ID;
                $aExcludeParams[] = MTShopArticleCatalogCore::URL_ITEM_ID;
                $aExcludeParams[] = MTShopBasketCore::URL_REQUEST_PARAMETER;

                $sCallingURL = $activePageService->getLinkToActivePageRelative(array(), $aExcludeParams);
            } else {
                //basket, so try to get from session
                if (isset($_SESSION[MTShopOrderWizardCore::SESSION_PARAM_NAME]) && !empty($_SESSION[MTShopOrderWizardCore::SESSION_PARAM_NAME])) {
                    $sCallingURL = $_SESSION[MTShopOrderWizardCore::SESSION_PARAM_NAME];
                } else {
                    $portal = $this->getPortalDomainService()->getActivePortal();
                    if (null !== $portal) {
                        $sCallingURL = $this->getPageService()->getLinkToPortalHomePageAbsolute();
                    } else {
                        $sCallingURL = '/';
                    }
                }
            }
        }

        return $sCallingURL;
    }
669706
public function getUrl()
    {
        $url = self::BASE_FNS_URL . $this->getUrlPath();

        if ($this->getHttpMethod() === self::HTTP_METHOD_GET) {
            $url .= '?' . http_build_query($this->getPayload());
        }

        return $url;
    }
623192
public function getUrl()
    {
        if (!$this->isSortable()) {
            return '';
        }

        $params = ['sort_key' => $this->key];

        if ($this->isSortKey()) {
            $params['sort_order'] = $this->request->input('sort_order') == 'desc' ? 'asc' : 'desc';
        }

        return '?'.http_build_query($params + $this->request->all());
    }
1219941
public function getGateways()
    {
        $gateways = [];
        foreach ($this->_gateways as $id => $gateway) {
            $gateways[$id] = $this->getGateway($id);
        }
        return $gateways;
    }
98613
protected function getPageUrl()
    {
        // Fetch chash
        $pageHash = null;
        if (!empty($GLOBALS['TSFE']->cHash)) {
            $pageHash = $GLOBALS['TSFE']->cHash;
        }


        // Fetch pageUrl
        if ($pageHash !== null) {
            $ret = FrontendUtility::getCurrentUrl();
        } else {
            $linkConf = array(
                'parameter' => $GLOBALS['TSFE']->id,
            );

            $ret = $GLOBALS['TSFE']->cObj->typoLink_URL($linkConf);
            $ret = $this->processLinkUrl($ret);
        }

        return $ret;
    }
242790
public function getGateways()
    {
        $gateways = array();

        foreach ($this->getGatewayNamespaces() as $namespace) {

            if (strpos($namespace, 'Omnipay') !== 0) {
                continue;
            }

            $matches = array();
            preg_match('/Omnipay\\\(.+?)\\\/', $namespace, $matches);

            if (isset($matches[1])) {
                $gateways[] = $matches[1];
            }
        }

        return $gateways;
    }
769964
protected function get_current_url()
    {
        // When running from commandline the REQUEST_URI is missing.
        if (!isset($_SERVER['REQUEST_URI'])) {
            return null;
        }

        // HTTP_HOST is a client-supplied header that is optional in HTTP 1.0
        $host = (!empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST']
            : (!empty($_SERVER['LOCAL_ADDR'])  ? $_SERVER['LOCAL_ADDR']
            : (!empty($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : '')));

        $httpS = $this->isHttps() ? 's' : '';
        return "http{$httpS}://{$host}{$_SERVER['REQUEST_URI']}";
    }
722780
protected function getCurrentUri() {
    $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'
      ? 'https://'
      : 'http://';
    $current_uri = $protocol . $_SERVER['HTTP_HOST'] . $this->getRequestUri();
    $parts = parse_url($current_uri);

    $query = '';
    if (!empty($parts['query'])) {
      $params = array();
      parse_str($parts['query'], $params);
      $params = array_filter($params);
      if (!empty($params)) {
        $query = '?' . http_build_query($params, NULL, '&');
      }
    }

    // Use port if non default.
    $port = isset($parts['port']) &&
      (($protocol === 'http://' && $parts['port'] !== 80) || ($protocol === 'https://' && $parts['port'] !== 443))
      ? ':' . $parts['port'] : '';

    // Rebuild.
    return $protocol . $parts['host'] . $port . $parts['path'] . $query;
  }
1141382
protected function GetDirectMaintenanceURL()
    {
        if (IPkgShopOrderPaymentConfig::ENVIRONMENT_PRODUCTION === $this->getEnvironment()) {
            $sPaymentURL = $this->GetConfigParameter('sOgoneDirectMaintenanceURLLive');
        } else {
            $sPaymentURL = $this->GetConfigParameter('sOgoneDirectMaintenanceURLTest');
        }

        return $sPaymentURL;
    }
941682
private function getUrl()
    {
        if ($this->mode === static::MODE_PROD) {
            $url = static::URL_PROD;
        } elseif ($this->mode === static::MODE_CONSIGNMENT) {
            $url = static::URL_CONSIGNMENT;
        } else {
            $url = static::URL_TEST;
        }

        return 'http' . ($this->secured ? 's' : '') . '://' . $url;
    }
590453
public function getUrl() {
		
		$sefParams = array();
		$cgiParams = array();
		
		// queue all parameters
		foreach ($this->vars as $key=>$val) {
			if (is_int($key)) {
				$sefParams[] = $val;
			} else {
				$cgiParams[$key] = $val;
			}
		}

		$url = $this->module . '/' . $this->action;
		
		// add slashed params
		if (count($sefParams)) {
			$url .= '/' . implode('/', $sefParams);
		}

		// add ordering
		if ($this->order) {
			$url .= '/order-' . $this->order;
		}
		
		// add pagination
		if ($this->page) {
			$url .= '/page-' . $this->getPage();
		}
		
		// add associative params
		if (count($cgiParams)) {
			$url .= '?' . http_build_query($cgiParams);
		}

		return $url;
		
	}
336742
public function getUrl()
    {
        $scheme = $this->scheme!=null ? $this->scheme . '://' : MString::EMPTY_STRING;
        $host = $this->host!=null ? $this->host : MString::EMPTY_STRING;
        $port = $this->port!=null ? ':' . $this->port : MString::EMPTY_STRING;
        $user = $this->user!=null ? $this->user : MString::EMPTY_STRING;
        $pass = $this->password!=null ? ':' . $this->password : MString::EMPTY_STRING;
        $pass = ($user||$pass) ? "$pass@" : MString::EMPTY_STRING;
        $path = $this->path!=null ? $this->path : MString::EMPTY_STRING;
        $query = $this->query!=null ? '?' . $this->query : MString::EMPTY_STRING;
        $fragment = $this->fragment!=null ? '#' . $this->fragment : MString::EMPTY_STRING;

        return $scheme . $user . $pass . $host . $port . $path . $query . $fragment;
    }