public override void Install() { //settings var settings = new PaystackPaymentSettings() { 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.PaystackPayment.RedirectionTip", "You will be redirected to Paystack site to complete the order."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.MerchantId", "Merchant ID"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.MerchantId.Hint", "Enter merchant ID."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.Key", "Working Key"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.Key.Hint", "Enter working key."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.MerchantParam", "Merchant Param"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.MerchantParam.Hint", "Enter merchant param."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.PayUri", "Pay URI"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.PayUri.Hint", "Enter Pay URI."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.AdditionalFee", "Additional fee"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.AdditionalFee.Hint", "Enter additional fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.AccessCode", "Access Code"); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.AccessCode.Hint", "Enter Access Code."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.PaymentMethodDescription", "For payment you will be redirected to the Paystack website."); this.AddOrUpdatePluginLocaleResource("Plugins.Iranum.Shop.PaystackPayment.Webhook", "Webhook URL"); base.Install(); }
public PaystackPayment(ILocalizationService localizationService, IOrderTotalCalculationService orderTotalCalculationService, ISettingService settingService, ICurrencyService currencyService, CurrencySettings currencySettings, PaystackPaymentSettings 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; }