/**
  * Returend the URL to the Hos, where the js-files hostet and switch between HTTP and HTTPS
  *
  * @return string
  */
 private function __getHostUrl()
 {
     $url = $this->useHttps ? MobileRedirect::HTTPS_HOST : MobileRedirect::HTTP_HOST;
     if ($this->config->getServer() == "pg") {
         $url = $this->useHttps ? MobileRedirect::HTTPS_PG_HOST : MobileRedirect::HTTP_PG_HOST;
     }
     return $url;
 }
Ejemplo n.º 2
0
 /**
  * Returns the URL to be appended to the alias of a shop.
  *
  * The method determines this by the "server" setting in ShopgateConfig. If it's set to
  * "custom", localdev.cc will be used for Shopgate local development and testing.
  *
  * @return string The URL that can be appended to the alias, e.g. ".shopgate.com"
  */
 protected function getShopgateUrl()
 {
     switch ($this->config->getServer()) {
         default:
             // fall through to "live"
         // fall through to "live"
         case 'live':
             return ShopgateMobileRedirectInterface::SHOPGATE_LIVE_ALIAS;
         case 'sl':
             return ShopgateMobileRedirectInterface::SHOPGATE_SL_ALIAS;
         case 'pg':
             return ShopgateMobileRedirectInterface::SHOPGATE_PG_ALIAS;
         case 'custom':
             return '.localdev.cc/php/shopgate/index.php';
             // for Shopgate development & testing
     }
 }