예제 #1
0
        public override void Install()
        {
            //settings
            var settings = new PayfirmaPaymentSettings
            {
                APIKey       = "YourAPIKey",
                MerchantId   = "YourMerchantId",
                TransactMode = Payfirma.TransactMode.AuthorizeAndCapture,
                IsTest       = true
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Notes", "If you're using this gateway, ensure that your primary store currency is either CAD or USD.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.IsTest", "Set Payfirma in Test Mode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.IsTest.Hint", "Check to enable Test Mode (testing environment).");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.TransactModeValues", "Transaction mode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.TransactModeValues.Hint", "Choose transaction mode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.MerchantId", "Merchant ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.MerchantId.Hint", "Specify Merchant ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.APIKey", "API Key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.APIKey.Hint", "Specify API Key.");

            base.Install();
        }
예제 #2
0
 public PayfirmaPaymentProcessor(PayfirmaPaymentSettings payfirmaPaymentSettings,
                                 ISettingService settingService,
                                 ICurrencyService currencyService,
                                 ICustomerService customerService,
                                 CurrencySettings currencySettings, IWebHelper webHelper,
                                 IOrderTotalCalculationService orderTotalCalculationService, IEncryptionService encryptionService)
 {
     this._payfirmaPaymentSettings = payfirmaPaymentSettings;
     this._settingService          = settingService;
     this._currencyService         = currencyService;
     this._customerService         = customerService;
     this._currencySettings        = currencySettings;
     this._webHelper = webHelper;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._encryptionService            = encryptionService;
 }
 public PayfirmaPaymentProcessor(PayfirmaPaymentSettings payfirmaPaymentSettings,
     ISettingService settingService,
     ICurrencyService currencyService,
     ICustomerService customerService,
     CurrencySettings currencySettings, IWebHelper webHelper,
     IOrderTotalCalculationService orderTotalCalculationService, IEncryptionService encryptionService)
 {
     this._payfirmaPaymentSettings = payfirmaPaymentSettings;
     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 PayfirmaPaymentSettings
            {
                APIKey = "YourAPIKey",
                MerchantId = "YourMerchantId",
                TransactMode = Payfirma.TransactMode.AuthorizeAndCapture,
                IsTest = true
            };
            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Notes", "If you're using this gateway, ensure that your primary store currency is either CAD or USD.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.IsTest", "Set Payfirma in Test Mode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.IsTest.Hint", "Check to enable Test Mode (testing environment).");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.TransactModeValues", "Transaction mode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.TransactModeValues.Hint", "Choose transaction mode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.MerchantId", "Merchant ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.MerchantId.Hint", "Specify Merchant ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.APIKey", "API Key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Payfirma.Fields.APIKey.Hint", "Specify API Key.");

            base.Install();
        }