public override void Install() { //settings var settings = new PayeezyPaymentSettings { UseSandbox = true, ExactID = "", Password = "", keyID = "", Hmackey = "" }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Notes", "If you're using this gateway, ensure that your ExactID, Password, keyID, Hmackey."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.UseSandbox", "Use Sandbox"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment)."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.ExactID", "ExactID"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.ExactID.Hint", "ExactID (Gateway ID)."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.Password", "Password"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.Password.Hint", "Specify Password."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.keyID", "keyID"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.keyID.Hint", "Specify keyID."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.Hmackey", "Hmackey"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.Hmackey.Hint", "Specify Hmackey."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.AdditionalFee", "Additional fee"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.AdditionalFeePercentage", "Additional fee. Use percentage"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payeezy.Fields.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used."); base.Install(); }
public PayeezyPaymentProcessor(ISettingService settingService, ICurrencyService currencyService, ICustomerService customerService, IWebHelper webHelper, IOrderTotalCalculationService orderTotalCalculationService, IOrderService orderService, IOrderProcessingService orderProcessingService, IEncryptionService encryptionService, ILogger logger, CurrencySettings currencySettings, PayeezyPaymentSettings payeezyPaymentSettings) { this._settingService = settingService; this._currencyService = currencyService; this._customerService = customerService; this._webHelper = webHelper; this._orderTotalCalculationService = orderTotalCalculationService; this._orderService = orderService; this._orderProcessingService = orderProcessingService; this._encryptionService = encryptionService; this._logger = logger; this._currencySettings = currencySettings; this._payeezyPaymentSettings = payeezyPaymentSettings; }