public override void Install() { //settings var settings = new ZonaVirtualPaymentSettings() { //UseSandbox = true, // BusinessEmail = "*****@*****.**", PdtToken = "Your PDT token here...", PdtValidateOrderTotal = true, EnableIpn = true, }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Fields.StoreName", "Store Name"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Fields.StoreName.Hint", "The name of the Store for Zona Virtual"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Fields.URL", "URL Payment Button"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Fields.URL.Hint", "URL provided for Zona Virtual"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Fields.IDStore", "Unique ID"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Fields.IDStore.Hint", "Unique ID"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Fields.IDKey", "WebService Password"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Fields.IDKey.Hint", "Password provided for Zona Virtual"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Fields.ServiceCode", "Service Code"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Fields.ServiceCode.Hint", "Service Code provided for Zona Virtual"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Front.Message", "Thanks for shopping with Zona Virtual"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.ZonaVirtual.Front.TitleDialog", "Payment process in Zona Virtual"); base.Install(); }
public ZonaVirtualPaymentProcessor(ZonaVirtualPaymentSettings ZonaVirtualPaymentSettings, ISettingService settingService, ICurrencyService currencyService, CurrencySettings currencySettings, IWebHelper webHelper, ICheckoutAttributeParser checkoutAttributeParser, ITaxService taxService, IOrderTotalCalculationService orderTotalCalculationService, HttpContextBase httpContext) { this._ZonaVirtualPaymentSettings = ZonaVirtualPaymentSettings; this._settingService = settingService; this._currencyService = currencyService; this._currencySettings = currencySettings; this._webHelper = webHelper; this._checkoutAttributeParser = checkoutAttributeParser; this._taxService = taxService; this._orderTotalCalculationService = orderTotalCalculationService; this._httpContext = httpContext; }