Exemplo n.º 1
0
        public ActionResult ManualConfigure(ManualConfigurationModel model, FormCollection form)
        {
            if (!ModelState.IsValid)
            {
                return(ManualConfigure());
            }

            ConfigurePost <ManualConfigurationModel, ManualPaymentSettings>(model, form, s =>
            {
                s.TransactMode        = model.TransactMode;
                s.ExcludedCreditCards = string.Join(",", model.ExcludedCreditCards ?? new string[0]);
            });

            return(ManualConfigure());
        }
        public ActionResult ManualConfigure(ManualConfigurationModel model, FormCollection form)
        {
            if (!ModelState.IsValid)
            {
                return(ManualConfigure());
            }

            var settings = ConfigurePost <ManualConfigurationModel, ManualPaymentSettings>(model);

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

            _services.Settings.SaveSetting(settings);

            return(View(model));
        }
        public ActionResult ManualConfigure(ManualConfigurationModel model, FormCollection form)
        {
            if (!ModelState.IsValid)
            {
                return(ManualConfigure());
            }

            ConfigurePost <ManualConfigurationModel, ManualPaymentSettings>(model, form, s =>
            {
                s.TransactMode = model.TransactMode;

                model.TransactModeValues = s.TransactMode.ToSelectList();
            });

            return(ManualConfigure());
        }