Esempio n. 1
0
 public YandexMoneyPaymentProcessor(CurrencySettings currencySettings,
                                    ICheckoutAttributeParser checkoutAttributeParser,
                                    ICurrencyService currencyService,
                                    IGenericAttributeService genericAttributeService,
                                    IHttpContextAccessor httpContextAccessor,
                                    ILocalizationService localizationService,
                                    IOrderTotalCalculationService orderTotalCalculationService,
                                    ISettingService settingService,
                                    ITaxService taxService,
                                    IProductService productService,
                                    IWebHelper webHelper,
                                    YandexMoneyPaymentSettings paymentSettings)
 {
     this._currencySettings             = currencySettings;
     this._checkoutAttributeParser      = checkoutAttributeParser;
     this._currencyService              = currencyService;
     this._genericAttributeService      = genericAttributeService;
     this._httpContextAccessor          = httpContextAccessor;
     this._localizationService          = localizationService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._settingService  = settingService;
     this._taxService      = taxService;
     this._productService  = productService;
     this._webHelper       = webHelper;
     this._paymentSettings = paymentSettings;
 }
Esempio n. 2
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            var settings = new YandexMoneyPaymentSettings()
            {
                DescriptionText = "<p>Yandex money payments - from card to yandex money wallet.</p><br><p>Warning! Check wallet payment limit!</p>"
            };

            _settingService.SaveSetting(settings);

            //locales
            this._localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.YandexMoney.DescriptionText", "Description");
            this._localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.YandexMoney.DescriptionText.Hint", "Insert wallet description.");
            this._localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.YandexMoney.Fields.WalletNumber", "Wallet");
            this._localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.YandexMoney.Fields.WalletNumber.Hint", "Insert wallet number.");
            this._localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.YandexMoney.Fields.SecretKey", "Secret key");
            this._localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.YandexMoney.Fields.SecretKey.Hint", "Insert secret key.");
            this._localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.YandexMoney.Fields.ApiKey", "Api key");
            this._localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.YandexMoney.Fields.ApiKey.Hint", "Insert api key.");
            this._localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.YandexMoney.PaymentForm.Targets", "Payment for order with number {0} от {1}");

            base.Install();
        }