public override void Install() { //settings var settings = new SecureSubmitPaymentSettings() { TransactMode = TransactMode.Authorize, PublicApiKey = "123", SecretApiKey = "456" }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Notes", "If you're using this gateway, ensure that your primary store currency is set to USD."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.TransactModeValues", "Transaction mode"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.TransactModeValues.Hint", "Choose transaction mode"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.PublicApiKey", "Public API Key"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.PublicApiKey.Hint", "Public API Key"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.SecretApiKey", "Secret API Key"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.SecretApiKey.Hint", "Specify your Secret API Key."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.AdditionalFee", "Additional fee"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.AdditionalFeePercentage", "Additional fee. Use percentage"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used."); base.Install(); }
public SecureSubmitPaymentProcessor(SecureSubmitPaymentSettings secureSubmitPaymentSettings, ISettingService settingService, ICurrencyService currencyService, ICustomerService customerService, CurrencySettings currencySettings, IWebHelper webHelper, IOrderTotalCalculationService orderTotalCalculationService, IEncryptionService encryptionService) { this._secureSubmitPaymentSettings = secureSubmitPaymentSettings; this._settingService = settingService; this._currencyService = currencyService; this._customerService = customerService; this._currencySettings = currencySettings; this._webHelper = webHelper; this._orderTotalCalculationService = orderTotalCalculationService; this._encryptionService = encryptionService; }
public SecureSubmitPaymentProcessor(SecureSubmitPaymentSettings secureSubmitPaymentSettings, ISettingService settingService, ICurrencyService currencyService, ICustomerService customerService, CurrencySettings currencySettings, IWebHelper webHelper, IOrderTotalCalculationService orderTotalCalculationService, IEncryptionService encryptionService) { this._secureSubmitPaymentSettings = secureSubmitPaymentSettings; this._settingService = settingService; this._currencyService = currencyService; this._customerService = customerService; this._currencySettings = currencySettings; this._webHelper = webHelper; this._orderTotalCalculationService = orderTotalCalculationService; this._encryptionService = encryptionService; }
public override void Install() { //settings var settings = new SecureSubmitPaymentSettings() { TransactMode = TransactMode.Authorize, PublicApiKey = "123", SecretApiKey = "456" }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Notes", "If you're using this gateway, ensure that your primary store currency is set to USD."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.TransactModeValues", "Transaction mode"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.TransactModeValues.Hint", "Choose transaction mode"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.PublicApiKey", "Public API Key"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.PublicApiKey.Hint", "Public API Key"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.SecretApiKey", "Secret API Key"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.SecretApiKey.Hint", "Specify your Secret API Key."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.AdditionalFee", "Additional fee"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers."); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.AdditionalFeePercentage", "Additional fee. Use percentage"); this.AddOrUpdatePluginLocaleResource("Plugins.Payments.SecureSubmit.Fields.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used."); base.Install(); }