public override void InitializeStore(string token = "") { CommerceLog("<color='magenta'>initializeStore:</color> with token" + token); enableListners(); Configurator configurator = Service.Get <Configurator>(); IDictionary <string, object> dictionaryForSystem = configurator.GetDictionaryForSystem("CSGConfig"); csgConfig = default(CSGConfig); csgConfig.SupportUrl = Service.Get <Localizer>().GetTokenTranslation("GlobalUI.Settings.SettingsURLs.cphelp"); csgConfig.Language = LocalizationLanguage.GetCultureLanguageString(Service.Get <Localizer>().Language); Dictionary <string, CommerceResourceURLsDefinition> dictionary = Service.Get <GameData>().Get <Dictionary <string, CommerceResourceURLsDefinition> >(); Disney.Kelowna.Common.Environment.Environment developmentEnvironment = Disney.Kelowna.Common.Environment.Environment.PRODUCTION; if (dictionary.TryGetValue(NetworkController.GenerateNetworkServiceConfig(developmentEnvironment).CommerceResourceURLsDefinition, out var value)) { csgConfig.BaseUrl = value.BaseURL; csgConfig.JavascriptUrls = value.JavascriptURLs; csgConfig.CSSUrls = value.CSSURLs; } string key = "windows"; IDictionary <string, object> dictionary2 = (IDictionary <string, object>)dictionaryForSystem["PROD"]; IDictionary <string, object> dictionary3 = (IDictionary <string, object>)dictionary2[key]; IDictionary <string, object> dictionary4 = (IDictionary <string, object>)dictionary2["base"]; csgConfig.DeviceType = dictionary3["DeviceType"].ToString(); csgConfig.DistributionChannelId = dictionary3["DistributionChannelId"].ToString(); csgConfig.PaypalMerchantId = dictionary4["PaypalMerchantId"].ToString(); csgConfig.PaypalEnvironment = dictionary4["PaypalEnvironment"].ToString(); csgConfig.SystemId = dictionary4["SystemId"].ToString(); csgConfig.ServicesDomain = dictionary4["ServicesDomain"].ToString(); csgConfig.MetadataDomain = dictionary4["MetadataDomain"].ToString(); }
public void ShowManageAccountFlow(CSGConfig csgConfig) { this.csgConfig = csgConfig; planId = ""; string url = this.csgConfig.BaseUrl + "?config={0}&planId={1}&pageType=manageAccount"; ShowFlow(url, "Membership.ManageAccount.CSG.WebviewerTitle"); }
public void ShowPurchaseFlow(CSGConfig csgConfig, string planId) { this.csgConfig = csgConfig; this.planId = planId; string url = this.csgConfig.BaseUrl + "?config={0}&planId={1}&pageType=checkout"; ShowFlow(url, "Membership.Purchase.CSG.WebviewerTitle"); }
public void ReloadPurchaseFlow(CSGConfig csgConfig, string planId) { this.csgConfig = csgConfig; string text = this.csgConfig.BaseUrl + "?config={0}&planId={1}&pageType=checkout"; if (webViewController != null) { IContentInterruption gate = new ParentGate(); webViewController.Show(text, gate, "Membership.Purchase.CSG.WebviewerTitle", AllowPopups: true, openPopupInNewBrowser: false, 1.8f, 3f); } else { ShowFlow(text, "Membership.Purchase.CSG.WebviewerTitle"); } }