public PayOnDelivery(ILocalizationService localizationService, IOrderTotalCalculationService orderTotalCalculationService, ISettingService settingService, ICurrencyService currencyService, CurrencySettings currencySettings, PayOnDeliveryPaymentSettings manualPaymentSettings, IWebHelper webHelper, HttpContextBase httpContext, IOrderService orderService) { this._localizationService = localizationService; this._orderTotalCalculationService = orderTotalCalculationService; this._settingService = settingService; this._manualPaymentSettings = manualPaymentSettings; this._currencyService = currencyService; this._currencySettings = currencySettings; this._webHelper = webHelper; this._httpContext = httpContext; this._orderService = orderService; }
public override void Install() { //settings var settings = new PayOnDeliveryPaymentSettings() { MerchantId = "", Key = "", AccessCode = "", MerchantParam = "", PayUri = "https://api.paystack.co/transaction/initialize", AdditionalFee = 0, Webhook = "http://www.google.com" }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.RedirectionTip", "No further action is required from PayonDelivery Payment option, just confirm order in the next step "); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.MerchantId", "Merchant ID"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.MerchantId.Hint", "Enter merchant ID."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.Key", "Working Key"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.Key.Hint", "Enter working key."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.MerchantParam", "Merchant Param"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.MerchantParam.Hint", "Enter merchant param."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.PayUri", "Pay URI"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.PayUri.Hint", "Enter Pay URI."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.AdditionalFee", "Additional fee"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.AdditionalFee.Hint", "Enter additional fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.AccessCode", "Access Code"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.AccessCode.Hint", "Enter Access Code."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.PaymentMethodDescription", "For payment you will be redirected to the Paystack website."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PayOnDelivery.Webhook", "Webhook URL"); base.Install(); }