Exemplo n.º 1
0
        public ActionResult Configure()
        {
            var model = new ConfigurationModel();
            model.TransactModeId = Convert.ToInt32(_manualPaymentSettings.TransactMode);
            model.AdditionalFee = _manualPaymentSettings.AdditionalFee;
            model.AdditionalFeePercentage = _manualPaymentSettings.AdditionalFeePercentage;
            model.TransactModeValues = _manualPaymentSettings.TransactMode.ToSelectList();

            return View("Nas.Plugin.Payments.Manual.Views.PaymentManual.Configure", model);
        }
Exemplo n.º 2
0
        public ActionResult Configure(ConfigurationModel model)
        {
            if (!ModelState.IsValid)
                return Configure();

            //save settings
            _manualPaymentSettings.TransactMode = (TransactMode)model.TransactModeId;
            _manualPaymentSettings.AdditionalFee = model.AdditionalFee;
            _manualPaymentSettings.AdditionalFeePercentage = model.AdditionalFeePercentage;
            _settingService.SaveSetting(_manualPaymentSettings);

            model.TransactModeValues = _manualPaymentSettings.TransactMode.ToSelectList();

            return View("Nas.Plugin.Payments.Manual.Views.PaymentManual.Configure", model);
        }