public ActionResult Configure()
        {
            var model = new ConfigurationModel();
            model.UseSandbox = _paypalDirectPaymentSettings.UseSandbox;
            model.TransactModeId = Convert.ToInt32(_paypalDirectPaymentSettings.TransactMode);
            model.ApiAccountName = _paypalDirectPaymentSettings.ApiAccountName;
            model.ApiAccountPassword = _paypalDirectPaymentSettings.ApiAccountPassword;
            model.Signature = _paypalDirectPaymentSettings.Signature;
            model.AdditionalFee = _paypalDirectPaymentSettings.AdditionalFee;
            model.AdditionalFeePercentage = _paypalDirectPaymentSettings.AdditionalFeePercentage;
            model.TransactModeValues = _paypalDirectPaymentSettings.TransactMode.ToSelectList();

            return View("Nas.Plugin.Payments.PayPalDirect.Views.PaymentPayPalDirect.Configure", model);
        }
        public ActionResult Configure(ConfigurationModel model)
        {
            if (!ModelState.IsValid)
                return Configure();

            //save settings
            _paypalDirectPaymentSettings.UseSandbox = model.UseSandbox;
            _paypalDirectPaymentSettings.TransactMode = (TransactMode)model.TransactModeId;
            _paypalDirectPaymentSettings.ApiAccountName = model.ApiAccountName;
            _paypalDirectPaymentSettings.ApiAccountPassword = model.ApiAccountPassword;
            _paypalDirectPaymentSettings.Signature = model.Signature;
            _paypalDirectPaymentSettings.AdditionalFee = model.AdditionalFee;
            _paypalDirectPaymentSettings.AdditionalFeePercentage = model.AdditionalFeePercentage;
            _settingService.SaveSetting(_paypalDirectPaymentSettings);

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

            return View("Nas.Plugin.Payments.PayPalDirect.Views.PaymentPayPalDirect.Configure", model);
        }