示例#1
0
        public ActionResult Configure(PaymentSettingModel model)
        {
            var stripeApiKey = _settingDictionaryService.GetSettingDictionary(CacheHelper.Settings.ID, StripePlugin.SettingStripeApiKey);

            stripeApiKey.Value = model.StripeApiKey;
            _settingDictionaryService.SaveSettingDictionary(stripeApiKey);

            var stripeClientID = _settingDictionaryService.GetSettingDictionary(CacheHelper.Settings.ID, StripePlugin.SettingStripeClientID);

            stripeClientID.Value = model.StripeClientID;
            _settingDictionaryService.SaveSettingDictionary(stripeClientID);

            var stripePublishableKey = _settingDictionaryService.GetSettingDictionary(CacheHelper.Settings.ID, StripePlugin.SettingStripePublishableKey);

            stripePublishableKey.Value = model.StripePublishableKey;
            _settingDictionaryService.SaveSettingDictionary(stripePublishableKey);

            _unitOfWorkAsync.SaveChanges();

            _dataCacheService.RemoveCachedItem(CacheKeys.SettingDictionary);
            _dataCacheService.RemoveCachedItem(CacheKeys.Settings);

            TempData[TempDataKeys.UserMessage] = "[[[Plugin updated!]]]";

            return(RedirectToAction("Plugins", "Plugin", new { area = "Admin" }));
        }
示例#2
0
        public ActionResult Configure()
        {
            var model = _settingDictionaryService.GetSettingDictionary(CacheHelper.Settings.ID, GoogleAnalyticsPlugin.SettingTrackingID);

            return(View("~/Plugins/Plugin.Widget.GoogleAnalytics/Views/Configure.cshtml", model));
        }
示例#3
0
        public ActionResult Configure()
        {
            var model = _settingDictionaryService.GetSettingDictionary(CacheHelper.Settings.ID, DisqusPlugin.SettingDisqusShortName);

            return(View("~/Plugins/Plugin.Widget.Disqus/Views/Configure.cshtml", model));
        }