public override async Task Install()
        {
            var settings = new CashOnDeliveryPaymentSettings
            {
                DescriptionText = "<p>In cases where an order is placed, an authorized representative will contact you, personally or over telephone, to confirm the order.<br />After the order is confirmed, it will be processed.<br />Orders once confirmed, cannot be cancelled.</p><p>P.S. You can edit this text from admin panel.</p>"
            };
            await _settingService.SaveSetting(settings);

            await this.AddOrUpdatePluginLocaleResource(_serviceProvider, "Plugins.Payment.CashOnDelivery.DescriptionText", "Description");

            await this.AddOrUpdatePluginLocaleResource(_serviceProvider, "Plugins.Payment.CashOnDelivery.DescriptionText.Hint", "Enter info that will be shown to customers during checkout");

            await this.AddOrUpdatePluginLocaleResource(_serviceProvider, "Plugins.Payment.CashOnDelivery.PaymentMethodDescription", "Cash On Delivery");

            await this.AddOrUpdatePluginLocaleResource(_serviceProvider, "Plugins.Payment.CashOnDelivery.AdditionalFee", "Additional fee");

            await this.AddOrUpdatePluginLocaleResource(_serviceProvider, "Plugins.Payment.CashOnDelivery.AdditionalFee.Hint", "The additional fee.");

            await this.AddOrUpdatePluginLocaleResource(_serviceProvider, "Plugins.Payment.CashOnDelivery.AdditionalFeePercentage", "Additional fee. Use percentage");

            await this.AddOrUpdatePluginLocaleResource(_serviceProvider, "Plugins.Payment.CashOnDelivery.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.");

            await this.AddOrUpdatePluginLocaleResource(_serviceProvider, "Plugins.Payment.CashOnDelivery.ShippableProductRequired", "Shippable product required");

            await this.AddOrUpdatePluginLocaleResource(_serviceProvider, "Plugins.Payment.CashOnDelivery.ShippableProductRequired.Hint", "An option indicating whether shippable products are required in order to display this payment method during checkout.");


            await base.Install();
        }
Пример #2
0
        public override async Task Install()
        {
            var settings = new CashOnDeliveryPaymentSettings
            {
                DescriptionText = "<p>Если вы заказали доставку вы можете оплатить заказ при получении наличными.</p>"
            };
            await _settingService.SaveSetting(settings);

            await this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService, "Plugins.Payment.CashOnDelivery.DescriptionText", "Description");

            await this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService, "Plugins.Payment.CashOnDelivery.DescriptionText.Hint", "Enter info that will be shown to customers during checkout");

            await this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService, "Plugins.Payment.CashOnDelivery.PaymentMethodDescription", "Cash On Delivery");

            await this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService, "Plugins.Payment.CashOnDelivery.AdditionalFee", "Additional fee");

            await this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService, "Plugins.Payment.CashOnDelivery.AdditionalFee.Hint", "The additional fee.");

            await this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService, "Plugins.Payment.CashOnDelivery.AdditionalFeePercentage", "Additional fee. Use percentage");

            await this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService, "Plugins.Payment.CashOnDelivery.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.");

            await this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService, "Plugins.Payment.CashOnDelivery.ShippableProductRequired", "Shippable product required");

            await this.AddOrUpdatePluginLocaleResource(_localizationService, _languageService, "Plugins.Payment.CashOnDelivery.ShippableProductRequired.Hint", "An option indicating whether shippable products are required in order to display this payment method during checkout.");


            await base.Install();
        }
Пример #3
0
 public CashOnDeliveryPaymentProcessor(CashOnDeliveryPaymentSettings cashOnDeliveryPaymentSettings,
                                       ISettingService settingService, IOrderTotalCalculationService orderTotalCalculationService)
 {
     this._cashOnDeliveryPaymentSettings = cashOnDeliveryPaymentSettings;
     this._settingService = settingService;
     this._orderTotalCalculationService = orderTotalCalculationService;
 }
 public CashOnDeliveryPaymentProcessor(CashOnDeliveryPaymentSettings cashOnDeliveryPaymentSettings,
                                       ISettingService settingService, IOrderTotalCalculationService orderTotalCalculationService,
                                       ILocalizationService localizationService, IWebHelper webHelper)
 {
     this._cashOnDeliveryPaymentSettings = cashOnDeliveryPaymentSettings;
     this._settingService = settingService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._localizationService          = localizationService;
     this._webHelper = webHelper;
 }
 public CashOnDeliveryPaymentProcessor(CashOnDeliveryPaymentSettings cashOnDeliveryPaymentSettings,
                                       ISettingService settingService, IOrderTotalCalculationService orderTotalCalculationService,
                                       ILocalizationService localizationService, IWebHelper webHelper, IServiceProvider serviceProvider)
 {
     _cashOnDeliveryPaymentSettings = cashOnDeliveryPaymentSettings;
     _settingService = settingService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _localizationService          = localizationService;
     _webHelper       = webHelper;
     _serviceProvider = serviceProvider;
 }