public override void Install() { var settings = new SagePayServerPaymentSettings() { TransactType = TransactTypeValues.Payment, ConnectTo = ConnectToValues.Simulator, Profile = ProfileValues.Normal }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.ConnectTo", "Connect To"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.ConnectTo.Hint", "Connect to test, simulator or live"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.TransactType", "TransactType"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.TransactType.Hint", "Transaction Type."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.Profile", "Profile"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.Profile.Hint", "Iframe or separate window"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.VendorName", "Vendor Name"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.VendorName.Hint", "Vendor Name."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.PartnerId", "PartnerId"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.PartnerId.Hint", "Affiliate Partner Id"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.AdditionalFee", "Additional fee"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.PaymentInfoError", "There were errors while registering a new transaction. Please try again. If you continue to have problems please contact us and we will be able to assist you."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.ResponsePageError", "There were errors while processing your payment. Please try again. If you continue to have problems please contact us and we will be able to assist you."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.PaymentMade", "Your payment has been made."); _context.InstallSchema(); base.Install(); }
public SagePayServerPaymentPlugin(ISagePayServerWorkflowService sagePayServerWorkflowService, ISettingService settingService, ISagePayServerTransactionService sagePayServerTransactionService, IOrderTotalCalculationService orderTotalCalculationService, SagePayServerTransactionObjectContext context, SagePayServerPaymentSettings sagePayServerPaymentSettings) { this._context = context; this._sagePayServerPaymentSettings = sagePayServerPaymentSettings; this._sagePayServerWorkflowService = sagePayServerWorkflowService; this._settingService = settingService; this._sagePayServerTransactionService = sagePayServerTransactionService; this._orderTotalCalculationService = orderTotalCalculationService; }
public override void Install() { var settings = new SagePayServerPaymentSettings() { TransactType = SagePayServerPaymentSettings.TransactTypeValues.PAYMENT, ConnectTo = SagePayServerPaymentSettings.ConnectToValues.SIMULATOR, Profile = SagePayServerPaymentSettings.ProfileValues.NORMAL }; _settingService.SaveSetting(settings); _context.InstallSchema(); base.Install(); }
public SagePayServerPaymentProcessor(SagePayServerPaymentSettings sagePayServerPaymentSettings, ISettingService settingService, ICurrencyService currencyService, IOrderProcessingService orderProcessingService, CurrencySettings currencySettings, IWebHelper webHelper, IWorkContext workContext, StoreInformationSettings storeInformationSettings, SagePayServerTransactionObjectContext context, ISagePayServerTransactionService sagePayServerTransactionService) { this._context = context; this._sagePayServerPaymentSettings = sagePayServerPaymentSettings; this._settingService = settingService; this._currencyService = currencyService; this._orderProcessingService = orderProcessingService; this._currencySettings = currencySettings; this._webHelper = webHelper; this._workContext = workContext; this._storeInformationSettings = storeInformationSettings; this._sagePayServerTransactionService = sagePayServerTransactionService; }
public override void Install() { var settings = new SagePayServerPaymentSettings() { TransactType = TransactTypeValues.Payment, //ConnectTo = ConnectToValues.Simulator, Profile = ProfileValues.Normal }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.ConnectTo", "Connect To"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.ConnectTo.Hint", "Connect to test, simulator or live"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.TransactType", "TransactType"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.TransactType.Hint", "Transaction Type."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.Profile", "Profile"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.Profile.Hint", "Iframe or separate window"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.VendorName", "Vendor Name"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.VendorName.Hint", "Vendor Name."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.PartnerId", "PartnerId"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.PartnerId.Hint", "Affiliate Partner Id"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.AdditionalFee", "Additional fee"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.PaymentInfoError", "There were errors while registering a new transaction. Please try again. If you continue to have problems please contact us and we will be able to assist you."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.ResponsePageError", "There were errors while processing your payment. Please try again. If you continue to have problems please contact us and we will be able to assist you."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.PaymentMade", "Your payment has been made."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.GiftAid", "Gift Aid"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.LiveEncryptionPassword", "Live Encryption Password"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SagePayServer.Fields.TestEncryptionPassword", "Test Encryption Password"); _context.InstallSchema(); base.Install(); }