Пример #1
0
        public override void Install()
        {
            var privat24PaymentSettings = new Privat24PaymentSettings
            {
                MerchantId        = string.Empty,
                MerchantSignature = string.Empty,
                Currencies        = "UAH, USD, EUR",
                AdditionalFee     = 0m,
                ShowDebugInfo     = false,
                IsTestMode        = false
            };

            _settingService.SaveSetting(privat24PaymentSettings, 0);

            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.MerchantId", "Merchant Id");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.MerchantId.Hint", "Enter merchant id");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.MerchantSignature", "merchant password");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.MerchantSignature.Hint", "Enter merchant password.");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.Currencies", "Enter currencies");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.Currencies.Hint", "Separate them by comma. (USD, EUR, UAH)");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.ShowDebugInfo", "Enable Debugging");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.ShowDebugInfo.Hint", "Write debugging information into file. In ~/App_Data/ folder");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.IsTestMode", "Enable test mode");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.IsTestMode.Hint", "Enable test mode (all transaction amounts are 1.00 USD, EUR, UAH)");
            this.AddOrUpdatePluginLocaleResource("Nop.Payments.Privat24.RedirectionTip", "You will be redirected to Privat24 site to complete the order.");

            base.Install();

            _paymentSettings.ActivePaymentMethodSystemNames.Add(PluginDescriptor.SystemName);
            _settingService.SaveSetting(_paymentSettings, 0);
        }
Пример #2
0
 public Privat24PaymentProcessor(Privat24PaymentSettings privat24PaymentSettings,
                                 ISettingService settingService,
                                 IWebHelper webHelper,
                                 CurrencySettings currencySettings,
                                 ICurrencyService currencyService,
                                 ILogger logger,
                                 PaymentSettings paymentSettings,
                                 HttpContextBase httpContext,
                                 IOrderService orderService,
                                 IOrderProcessingService orderProcessingService)
 {
     _privat24PaymentSettings = privat24PaymentSettings;
     _settingService          = settingService;
     _webHelper              = webHelper;
     _currencySettings       = currencySettings;
     _currencyService        = currencyService;
     _logger                 = logger;
     _paymentSettings        = paymentSettings;
     _httpContext            = httpContext;
     _orderService           = orderService;
     _orderProcessingService = orderProcessingService;
 }