public IpayAfricaPaymentProcessor(CurrencySettings currencySettings, ICheckoutAttributeParser checkoutAttributeParser, ICurrencyService currencyService, IGenericAttributeService genericAttributeService, IHttpContextAccessor httpContextAccessor, ILocalizationService localizationService, IPaymentService paymentService, IOrderTotalCalculationService orderTotalCalculationService, ISettingService settingService, ITaxService taxService, IWebHelper webHelper, IpayAfricaPaymentSettings IpayAfricaPaymentSettings) { this._currencySettings = currencySettings; this._checkoutAttributeParser = checkoutAttributeParser; this._currencyService = currencyService; this._genericAttributeService = genericAttributeService; this._httpContextAccessor = httpContextAccessor; this._localizationService = localizationService; this._paymentService = paymentService; this._orderTotalCalculationService = orderTotalCalculationService; this._settingService = settingService; this._taxService = taxService; this._webHelper = webHelper; this._IpayAfricaPaymentSettings = IpayAfricaPaymentSettings; }
/// <summary> /// Install the plugin /// </summary> public override void Install() { //settings var settings = new IpayAfricaPaymentSettings() //mayank { MerchantId = "", MerchantKey = "" }; _settingService.SaveSetting(settings); //locales _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.IpayAfrica.RedirectionTip", "Pay with your MPESA or Airtel Money Mobile Wallet. You will be redirected to IpayAfrica site to complete the order."); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.IpayAfrica.MerchantId", "Merchant ID"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.IpayAfrica.MerchantId.Hint", "Enter merchant ID."); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.IpayAfrica.MerchantKey", "Merchant Key"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.IpayAfrica.MerchantKey.Hint", "Enter Merchant key."); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.IpayAfrica.PaymentMethodDescription", "Pay with your MPESA or Airtel Money Mobile Wallet. You will be redirected to IpayAfrica site to complete the order."); base.Install(); }