public ActionResult Configure() { var model = new ConfigurationModel(); model.publicKey = _PayMillPaymentSettings.publicKey; model.privateKey = _PayMillPaymentSettings.privateKey; model.apiUrl = _PayMillPaymentSettings.apiUrl; return View("Nop.Plugin.Payments.PayMill.Views.PaymentPayMill.Configure", model); }
public ActionResult Configure(ConfigurationModel model) { if (!ModelState.IsValid) return Configure(); //save settings _PayMillPaymentSettings.publicKey = model.publicKey; _PayMillPaymentSettings.privateKey = model.privateKey; _PayMillPaymentSettings.apiUrl = model.apiUrl; _settingService.SaveSetting(_PayMillPaymentSettings); return View("Nop.Plugin.Payments.PayMill.Views.PaymentPayMill.Configure", model); }