public PrivatPaymentProcessor(ILocalizationService localizationService, IPaymentService paymentService, ISettingService settingService, IWebHelper webHelper, PrivatPaymentSettings PrivatPaymentSettings) { this._localizationService = localizationService; this._paymentService = paymentService; this._settingService = settingService; this._webHelper = webHelper; this._PrivatPaymentSettings = PrivatPaymentSettings; }
/// <summary> /// Install the plugin /// </summary> public override void Install() { //settings var settings = new PrivatPaymentSettings { TransactMode = TransactMode.Pending }; _settingService.SaveSetting(settings); //locales _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Privat.Instructions", "This payment method stores credit card information in database (it's not sent to any third-party processor). In order to store credit card information, you must be PCI compliant."); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Privat.Fields.AdditionalFee", "Additional fee"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Privat.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers."); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Privat.Fields.AdditionalFeePercentage", "Additional fee. Use percentage"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Privat.Fields.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used."); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Privat.Fields.TransactMode", "After checkout mark payment as"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Privat.Fields.TransactMode.Hint", "Specify transaction mode."); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Privat.PaymentMethodDescription", "Privat"); base.Install(); }
public PrivatPaymentProcessor(CurrencySettings currencySettings, ICheckoutAttributeParser checkoutAttributeParser, ICurrencyService currencyService, IGenericAttributeService genericAttributeService, IHttpContextAccessor httpContextAccessor, ILocalizationService localizationService, IPaymentService paymentService, ISettingService settingService, ITaxService taxService, IWebHelper webHelper, PrivatPaymentSettings privatPaymentSettings) { this._currencySettings = currencySettings; this._checkoutAttributeParser = checkoutAttributeParser; this._currencyService = currencyService; this._genericAttributeService = genericAttributeService; this._httpContextAccessor = httpContextAccessor; this._localizationService = localizationService; this._paymentService = paymentService; this._settingService = settingService; this._taxService = taxService; this._webHelper = webHelper; this._privatPaymentSettings = privatPaymentSettings; }