public PaymentEngineConnector(string loginDomain, string accessKey, string storeCode, string deviceCode, string customWebServiceUrl = null) { string baseUrl; ServiceURLHelper.GetServiceURL(); if (ServiceURLHelper.Service_Urls != null && !string.IsNullOrWhiteSpace(ServiceURLHelper.Service_Urls.PaymentApiUrl)) { customWebServiceUrl = ServiceURLHelper.Service_Urls.PaymentApiUrl; } if (!string.IsNullOrWhiteSpace(customWebServiceUrl)) { baseUrl = customWebServiceUrl; } else if (loginDomain.StartsWith("localhost", StringComparison.InvariantCultureIgnoreCase)) { baseUrl = "http://" + loginDomain; } else if (loginDomain.StartsWith("127.0.0.1", StringComparison.InvariantCultureIgnoreCase)) { baseUrl = "http://" + loginDomain; } else { baseUrl = string.Format("https://{0}-ws.bloyal.com", loginDomain); } _webserviceUrl = String.Format("{0}/ws35/PaymentEngine.svc", baseUrl); _accessKey = accessKey; _storeCode = storeCode; _deviceCode = deviceCode; }
public LoyaltyEngineServices() { SetupResolver(); ServiceURLHelper.GetServiceURL(); if (ServiceURLHelper.Service_Urls != null) { _service = new LoyaltyService(ServiceURLHelper.Service_Urls.LoyaltyEngineApiUrl, _conFigHelper.ACCESS_KEY); //_service = new LoyaltyService("http://localhost:49653", _conFigHelper.ACCESS_KEY); SNIPPET_Config_URL = !string.IsNullOrWhiteSpace(_conFigHelper.SNIPPET_URL) ? _conFigHelper.SNIPPET_URL : ServiceURLHelper.Service_Urls.POSSnippetsUrl; } }