public override void Install() { //settings var settings = new MonerisPaymentSettings() { UseSandbox = true, AdditionalFeePercentage = false }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.RedirectionTip", "You will be redirected to Moneris site to complete the order."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.UseSandbox", "Use Sandbox"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment)."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.AdditionalFee", "Additional fee"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.AdditionalFeePercentage", "Additinal fee. Use percentage"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.PsStoreId", "ps_store_id"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.PsStoreId.Hint", "Enter your ps_store_id"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.HppKey", "hpp_key"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Moneris.Fields.HppKey.Hint", "Enter your hpp_key"); base.Install(); }
public MonerisPaymentProcessor(ISettingService settingService, MonerisPaymentSettings monerisPaymentSettings, IOrderTotalCalculationService orderTotalCalculationService) { this._settingService = settingService; this._monerisPaymentSettings = monerisPaymentSettings; this._orderTotalCalculationService = orderTotalCalculationService; }
public MonerisPaymentProcessor(ISettingService settingService, MonerisPaymentSettings monerisPaymentSettings, IOrderTotalCalculationService orderTotalCalculationService, ILocalizationService localizationService, IWebHelper webHelper) { this._settingService = settingService; this._monerisPaymentSettings = monerisPaymentSettings; this._orderTotalCalculationService = orderTotalCalculationService; this._localizationService = localizationService; this._webHelper = webHelper; }