示例#1
0
 public ReturnBackRedeemedRewardPointsCommandHandler(
     IRewardPointsService rewardPointsService,
     ILocalizationService localizationService)
 {
     _rewardPointsService = rewardPointsService;
     _localizationService = localizationService;
 }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="workContext">Work context</param>
 /// <param name="storeContext">Store context</param>
 /// <param name="priceCalculationService">Price calculation service</param>
 /// <param name="taxService">Tax service</param>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="paymentService">Payment service</param>
 /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
 /// <param name="discountService">Discount service</param>
 /// <param name="giftCardService">Gift card service</param>
 /// <param name="genericAttributeService">Generic attribute service</param>
 /// <param name="rewardPointsService">Reward points service</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="shoppingCartSettings">Shopping cart settings</param>
 /// <param name="catalogSettings">Catalog settings</param>
 public OrderTotalCalculationService(IWorkContext workContext,
     IStoreContext storeContext,
     IPriceCalculationService priceCalculationService,
     ITaxService taxService,
     IShippingService shippingService,
     IPaymentService paymentService,
     ICheckoutAttributeParser checkoutAttributeParser,
     IDiscountService discountService,
     IGiftCardService giftCardService,
     IGenericAttributeService genericAttributeService,
     IRewardPointsService rewardPointsService,
     TaxSettings taxSettings,
     RewardPointsSettings rewardPointsSettings,
     ShippingSettings shippingSettings,
     ShoppingCartSettings shoppingCartSettings,
     CatalogSettings catalogSettings)
 {
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._priceCalculationService = priceCalculationService;
     this._taxService = taxService;
     this._shippingService = shippingService;
     this._paymentService = paymentService;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._discountService = discountService;
     this._giftCardService = giftCardService;
     this._genericAttributeService = genericAttributeService;
     this._rewardPointsService = rewardPointsService;
     this._taxSettings = taxSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._shippingSettings = shippingSettings;
     this._shoppingCartSettings = shoppingCartSettings;
     this._catalogSettings = catalogSettings;
 }
示例#3
0
 public CheckoutViewComponent(
     IWorkContext workContext,
     IStoreContext storeContext,
     IStoreMappingService storeMappingService,
     IShoppingCartService shoppingCartService,
     ILocalizationService localizationService,
     ITaxService taxService,
     ICurrencyService currencyService,
     IPriceFormatter priceFormatter,
     IOrderProcessingService orderProcessingService,
     ICustomerService customerService,
     IGenericAttributeService genericAttributeService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IShippingService shippingService,
     IPaymentService paymentService,
     IPluginFinder pluginFinder,
     IOrderTotalCalculationService orderTotalCalculationService,
     ILogger logger,
     IOrderService orderService,
     IWebHelper webHelper,
     IHttpContextAccessor httpContextAccessor,
     IAddressWebService addressWebService,
     IRewardPointsService rewardPointsService,
     OrderSettings orderSettings,
     RewardPointsSettings rewardPointsSettings,
     PaymentSettings paymentSettings,
     ShippingSettings shippingSettings
     )
 {
     this._workContext                  = workContext;
     this._storeContext                 = storeContext;
     this._storeMappingService          = storeMappingService;
     this._shoppingCartService          = shoppingCartService;
     this._localizationService          = localizationService;
     this._taxService                   = taxService;
     this._currencyService              = currencyService;
     this._priceFormatter               = priceFormatter;
     this._orderProcessingService       = orderProcessingService;
     this._customerService              = customerService;
     this._genericAttributeService      = genericAttributeService;
     this._countryService               = countryService;
     this._stateProvinceService         = stateProvinceService;
     this._shippingService              = shippingService;
     this._paymentService               = paymentService;
     this._pluginFinder                 = pluginFinder;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._logger               = logger;
     this._orderService         = orderService;
     this._webHelper            = webHelper;
     this._httpContextAccessor  = httpContextAccessor;
     this._addressWebService    = addressWebService;
     this._rewardPointsService  = rewardPointsService;
     this._orderSettings        = orderSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._paymentSettings      = paymentSettings;
     this._shippingSettings     = shippingSettings;
 }
示例#4
0
 public OrderController(IOrderService orderService,
                        IProductService productService,
                        IShipmentService shipmentService,
                        IWorkContext workContext,
                        ICurrencyService currencyService,
                        IPriceFormatter priceFormatter,
                        IOrderProcessingService orderProcessingService,
                        IDateTimeHelper dateTimeHelper,
                        IPaymentService paymentService,
                        ILocalizationService localizationService,
                        IPdfService pdfService,
                        IShippingService shippingService,
                        ICountryService countryService,
                        IProductAttributeParser productAttributeParser,
                        IWebHelper webHelper,
                        IDownloadService downloadService,
                        IAddressAttributeFormatter addressAttributeFormatter,
                        IStoreContext storeContext,
                        IOrderTotalCalculationService orderTotalCalculationService,
                        IRewardPointsService rewardPointsService,
                        IGiftCardService giftCardService,
                        CatalogSettings catalogSettings,
                        OrderSettings orderSettings,
                        TaxSettings taxSettings,
                        ShippingSettings shippingSettings,
                        AddressSettings addressSettings,
                        RewardPointsSettings rewardPointsSettings,
                        PdfSettings pdfSettings)
 {
     this._orderService           = orderService;
     this._productService         = productService;
     this._shipmentService        = shipmentService;
     this._workContext            = workContext;
     this._currencyService        = currencyService;
     this._priceFormatter         = priceFormatter;
     this._orderProcessingService = orderProcessingService;
     this._dateTimeHelper         = dateTimeHelper;
     this._paymentService         = paymentService;
     this._localizationService    = localizationService;
     this._pdfService             = pdfService;
     this._shippingService        = shippingService;
     this._countryService         = countryService;
     this._productAttributeParser = productAttributeParser;
     this._webHelper                    = webHelper;
     this._downloadService              = downloadService;
     this._addressAttributeFormatter    = addressAttributeFormatter;
     this._storeContext                 = storeContext;
     this._rewardPointsService          = rewardPointsService;
     this._giftCardService              = giftCardService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._catalogSettings              = catalogSettings;
     this._orderSettings                = orderSettings;
     this._taxSettings                  = taxSettings;
     this._shippingSettings             = shippingSettings;
     this._addressSettings              = addressSettings;
     this._rewardPointsSettings         = rewardPointsSettings;
     this._pdfSettings                  = pdfSettings;
 }
 public OrderViewModelService(
     IOrderService orderService,
     IStoreContext storeContext,
     IWorkContext workContext,
     IDateTimeHelper dateTimeHelper,
     ILocalizationService localizationService,
     ICurrencyService currencyService,
     IOrderProcessingService orderProcessingService,
     IPriceFormatter priceFormatter,
     IDownloadService downloadService,
     IProductAttributeParser productAttributeParser,
     IProductService productService,
     ICountryService countryService,
     IAddressViewModelService addressViewModelService,
     IShipmentService shipmentService,
     IPaymentService paymentService,
     IGiftCardService giftCardService,
     IShippingService shippingService,
     IRewardPointsService rewardPointsService,
     IOrderTotalCalculationService orderTotalCalculationService,
     IServiceProvider serviceProvider,
     OrderSettings orderSettings,
     PdfSettings pdfSettings,
     TaxSettings taxSettings,
     CatalogSettings catalogSettings,
     ShippingSettings shippingSettings,
     RewardPointsSettings rewardPointsSettings)
 {
     _orderService                 = orderService;
     _storeContext                 = storeContext;
     _workContext                  = workContext;
     _dateTimeHelper               = dateTimeHelper;
     _localizationService          = localizationService;
     _currencyService              = currencyService;
     _orderProcessingService       = orderProcessingService;
     _priceFormatter               = priceFormatter;
     _downloadService              = downloadService;
     _productAttributeParser       = productAttributeParser;
     _productService               = productService;
     _countryService               = countryService;
     _addressViewModelService      = addressViewModelService;
     _shipmentService              = shipmentService;
     _paymentService               = paymentService;
     _giftCardService              = giftCardService;
     _shippingService              = shippingService;
     _rewardPointsService          = rewardPointsService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _serviceProvider              = serviceProvider;
     _orderSettings                = orderSettings;
     _pdfSettings                  = pdfSettings;
     _taxSettings                  = taxSettings;
     _catalogSettings              = catalogSettings;
     _shippingSettings             = shippingSettings;
     _rewardPointsSettings         = rewardPointsSettings;
 }
 public GetCustomerRewardPointsHandler(IRewardPointsService rewardPointsService, IDateTimeHelper dateTimeHelper,
                                       ICurrencyService currencyService, IPriceFormatter priceFormatter, IOrderTotalCalculationService orderTotalCalculationService,
                                       RewardPointsSettings rewardPointsSettings)
 {
     _rewardPointsService          = rewardPointsService;
     _dateTimeHelper               = dateTimeHelper;
     _currencyService              = currencyService;
     _priceFormatter               = priceFormatter;
     _orderTotalCalculationService = orderTotalCalculationService;
     _rewardPointsSettings         = rewardPointsSettings;
 }
示例#7
0
 public ReduceRewardPointsCommandHandler(
     ICustomerService customerService,
     IRewardPointsService rewardPointsService,
     IMediator mediator,
     IOrderService orderService,
     ILocalizationService localizationService)
 {
     _customerService     = customerService;
     _rewardPointsService = rewardPointsService;
     _mediator            = mediator;
     _orderService        = orderService;
     _localizationService = localizationService;
 }
 public CheckoutViewModelService(
     IOrderTotalCalculationService orderTotalCalculationService,
     IWorkContext workContext,
     ICountryService countryService,
     IStoreMappingService storeMappingService,
     IAddressViewModelService addressViewModelService,
     ITaxService taxService,
     IShippingService shippingService,
     ILocalizationService localizationService,
     ICurrencyService currencyService,
     IStoreContext storeContext,
     IPriceFormatter priceFormatter,
     IGenericAttributeService genericAttributeService,
     IPaymentService paymentService,
     IRewardPointsService rewardPointsService,
     IWebHelper webHelper,
     IOrderProcessingService orderProcessingService,
     IOrderService orderService,
     ShippingSettings shippingSettings,
     RewardPointsSettings rewardPointsSettings,
     PaymentSettings paymentSettings,
     OrderSettings orderSettings)
 {
     _orderTotalCalculationService = orderTotalCalculationService;
     _workContext             = workContext;
     _countryService          = countryService;
     _storeMappingService     = storeMappingService;
     _addressViewModelService = addressViewModelService;
     _taxService              = taxService;
     _shippingService         = shippingService;
     _localizationService     = localizationService;
     _currencyService         = currencyService;
     _storeContext            = storeContext;
     _priceFormatter          = priceFormatter;
     _genericAttributeService = genericAttributeService;
     _paymentService          = paymentService;
     _rewardPointsService     = rewardPointsService;
     _webHelper = webHelper;
     _orderProcessingService = orderProcessingService;
     _orderService           = orderService;
     _shippingSettings       = shippingSettings;
     _rewardPointsSettings   = rewardPointsSettings;
     _paymentSettings        = paymentSettings;
     _orderSettings          = orderSettings;
 }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="customerService">Customer service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="newsLetterSubscriptionService">Newsletter subscription service</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="storeService">Store service</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="customerSettings">Customer settings</param>
 /// <param name="rewardPointsService">Reward points service</param>
 public CustomerRegistrationService(ICustomerService customerService, 
     IEncryptionService encryptionService, 
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     ILocalizationService localizationService,
     IStoreService storeService,
     RewardPointsSettings rewardPointsSettings,
     CustomerSettings customerSettings,
     IRewardPointsService rewardPointsService)
 {
     this._customerService = customerService;
     this._encryptionService = encryptionService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._localizationService = localizationService;
     this._storeService = storeService;
     this._rewardPointsSettings = rewardPointsSettings;
     this._customerSettings = customerSettings;
     this._rewardPointsService = rewardPointsService;
 }
示例#10
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="customerService">Customer service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="newsLetterSubscriptionService">Newsletter subscription service</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="storeService">Store service</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="customerSettings">Customer settings</param>
 /// <param name="rewardPointsService">Reward points service</param>
 public CustomerRegistrationService(ICustomerService customerService,
                                    IEncryptionService encryptionService,
                                    INewsLetterSubscriptionService newsLetterSubscriptionService,
                                    ILocalizationService localizationService,
                                    IStoreService storeService,
                                    RewardPointsSettings rewardPointsSettings,
                                    CustomerSettings customerSettings,
                                    IRewardPointsService rewardPointsService)
 {
     this._customerService               = customerService;
     this._encryptionService             = encryptionService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._localizationService           = localizationService;
     this._storeService         = storeService;
     this._rewardPointsSettings = rewardPointsSettings;
     this._customerSettings     = customerSettings;
     this._rewardPointsService  = rewardPointsService;
 }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="customerService">Customer service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="newsLetterSubscriptionService">Newsletter subscription service</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="storeService">Store service</param>
 /// <param name="mediator">Mediator</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="customerSettings">Customer settings</param>
 /// <param name="rewardPointsService">Reward points service</param>
 public CustomerRegistrationService(ICustomerService customerService,
                                    IEncryptionService encryptionService,
                                    INewsLetterSubscriptionService newsLetterSubscriptionService,
                                    ILocalizationService localizationService,
                                    IStoreService storeService,
                                    IMediator mediator,
                                    RewardPointsSettings rewardPointsSettings,
                                    CustomerSettings customerSettings,
                                    IRewardPointsService rewardPointsService)
 {
     _customerService               = customerService;
     _encryptionService             = encryptionService;
     _newsLetterSubscriptionService = newsLetterSubscriptionService;
     _localizationService           = localizationService;
     _storeService         = storeService;
     _mediator             = mediator;
     _rewardPointsSettings = rewardPointsSettings;
     _customerSettings     = customerSettings;
     _rewardPointsService  = rewardPointsService;
 }
 public GetPaymentMethodHandler(IRewardPointsService rewardPointsService,
                                IOrderTotalCalculationService orderTotalCalculationService,
                                ICurrencyService currencyService,
                                IPriceFormatter priceFormatter,
                                IPaymentService paymentService,
                                ILocalizationService localizationService,
                                ITaxService taxService,
                                IWebHelper webHelper,
                                RewardPointsSettings rewardPointsSettings,
                                PaymentSettings paymentSettings)
 {
     _rewardPointsService          = rewardPointsService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _currencyService      = currencyService;
     _priceFormatter       = priceFormatter;
     _paymentService       = paymentService;
     _localizationService  = localizationService;
     _taxService           = taxService;
     _webHelper            = webHelper;
     _rewardPointsSettings = rewardPointsSettings;
     _paymentSettings      = paymentSettings;
 }
示例#13
0
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="workContext">Work context</param>
        /// <param name="storeContext">Store context</param>
        /// <param name="priceCalculationService">Price calculation service</param>
        /// <param name="taxService">Tax service</param>
        /// <param name="shippingService">Shipping service</param>
        /// <param name="paymentService">Payment service</param>
        /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
        /// <param name="discountService">Discount service</param>
        /// <param name="giftCardService">Gift card service</param>
        /// <param name="genericAttributeService">Generic attribute service</param>
        /// <param name="rewardPointsService">Reward points service</param>
        /// <param name="taxSettings">Tax settings</param>
        /// <param name="rewardPointsSettings">Reward points settings</param>
        /// <param name="shippingSettings">Shipping settings</param>
        /// <param name="shoppingCartSettings">Shopping cart settings</param>
        /// <param name="catalogSettings">Catalog settings</param>
        public OrderTotalCalculationService(
            IWorkContext workContext,
            IStoreContext storeContext,
            IPriceCalculationService priceCalculationService,
            ITaxService taxService,
            IShippingService shippingService,
            IPaymentService paymentService,
            ICheckoutAttributeParser checkoutAttributeParser,
            IDiscountService discountService,
            IGiftCardService giftCardService,
            IGenericAttributeService genericAttributeService,
            IRewardPointsService rewardPointsService,

            TaxSettings taxSettings,
            RewardPointsSettings rewardPointsSettings,
            ShippingSettings shippingSettings,
            ShoppingCartSettings shoppingCartSettings,
            CatalogSettings catalogSettings
            )
        {
            this._workContext             = workContext;
            this._storeContext            = storeContext;
            this._priceCalculationService = priceCalculationService;
            this._taxService              = taxService;
            this._shippingService         = shippingService;
            this._paymentService          = paymentService;
            this._checkoutAttributeParser = checkoutAttributeParser;
            this._discountService         = discountService;
            this._giftCardService         = giftCardService;
            this._genericAttributeService = genericAttributeService;
            this._rewardPointsService     = rewardPointsService;

            this._taxSettings          = taxSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._shippingSettings     = shippingSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._catalogSettings      = catalogSettings;
        }
示例#14
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="workContext">Work context</param>
 /// <param name="storeContext">Store context</param>
 /// <param name="priceCalculationService">Price calculation service</param>
 /// <param name="taxService">Tax service</param>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="paymentService">Payment service</param>
 /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
 /// <param name="discountService">Discount service</param>
 /// <param name="giftCardService">Gift card service</param>
 /// <param name="rewardPointsService">Reward points service</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="shoppingCartSettings">Shopping cart settings</param>
 /// <param name="catalogSettings">Catalog settings</param>
 public OrderTotalCalculationService(IWorkContext workContext,
                                     IStoreContext storeContext,
                                     IPriceCalculationService priceCalculationService,
                                     ITaxService taxService,
                                     IShippingService shippingService,
                                     IPaymentService paymentService,
                                     ICheckoutAttributeParser checkoutAttributeParser,
                                     IDiscountService discountService,
                                     IGiftCardService giftCardService,
                                     IRewardPointsService rewardPointsService,
                                     IProductService productService,
                                     ICurrencyService currencyService,
                                     TaxSettings taxSettings,
                                     RewardPointsSettings rewardPointsSettings,
                                     ShippingSettings shippingSettings,
                                     ShoppingCartSettings shoppingCartSettings,
                                     CatalogSettings catalogSettings)
 {
     _workContext             = workContext;
     _storeContext            = storeContext;
     _priceCalculationService = priceCalculationService;
     _taxService              = taxService;
     _shippingService         = shippingService;
     _paymentService          = paymentService;
     _checkoutAttributeParser = checkoutAttributeParser;
     _discountService         = discountService;
     _giftCardService         = giftCardService;
     _rewardPointsService     = rewardPointsService;
     _productService          = productService;
     _currencyService         = currencyService;
     _taxSettings             = taxSettings;
     _rewardPointsSettings    = rewardPointsSettings;
     _shippingSettings        = shippingSettings;
     _shoppingCartSettings    = shoppingCartSettings;
     _catalogSettings         = catalogSettings;
 }
示例#15
0
 public CheckoutController(IWorkContext workContext,
     IStoreContext storeContext,
     IStoreMappingService storeMappingService,
     IShoppingCartService shoppingCartService, 
     ILocalizationService localizationService, 
     ITaxService taxService, 
     ICurrencyService currencyService, 
     IPriceFormatter priceFormatter, 
     IOrderProcessingService orderProcessingService,
     ICustomerService customerService, 
     IGenericAttributeService genericAttributeService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IShippingService shippingService, 
     IPaymentService paymentService,
     IPluginFinder pluginFinder,
     IOrderTotalCalculationService orderTotalCalculationService,
     ILogger logger,
     IOrderService orderService,
     IWebHelper webHelper,
     HttpContextBase httpContext,
     IAddressAttributeParser addressAttributeParser,
     IAddressAttributeService addressAttributeService,
     IAddressAttributeFormatter addressAttributeFormatter,
     IRewardPointsService rewardPointsService,
     OrderSettings orderSettings, 
     RewardPointsSettings rewardPointsSettings,
     PaymentSettings paymentSettings,
     ShippingSettings shippingSettings,
     AddressSettings addressSettings)
 {
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._storeMappingService = storeMappingService;
     this._shoppingCartService = shoppingCartService;
     this._localizationService = localizationService;
     this._taxService = taxService;
     this._currencyService = currencyService;
     this._priceFormatter = priceFormatter;
     this._orderProcessingService = orderProcessingService;
     this._customerService = customerService;
     this._genericAttributeService = genericAttributeService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._shippingService = shippingService;
     this._paymentService = paymentService;
     this._pluginFinder = pluginFinder;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._logger = logger;
     this._orderService = orderService;
     this._webHelper = webHelper;
     this._httpContext = httpContext;
     this._addressAttributeParser = addressAttributeParser;
     this._addressAttributeService = addressAttributeService;
     this._addressAttributeFormatter = addressAttributeFormatter;
     this._rewardPointsService = rewardPointsService;
     this._orderSettings = orderSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._paymentSettings = paymentSettings;
     this._shippingSettings = shippingSettings;
     this._addressSettings = addressSettings;
 }
        public void TestInitialize()
        {
            _securitySettings = new SecuritySettings
            {
                EncryptionKey = "273ece6f97dd844d97dd8f4d"
            };
            _rewardPointsSettings = new RewardPointsSettings
            {
                Enabled = false,
            };

            _encryptionService = new EncryptionService(_securitySettings);

            var customer1 = new Customer
            {
                Username       = "******",
                Email          = "*****@*****.**",
                PasswordFormat = PasswordFormat.Hashed,
                Active         = true
            };

            string saltKey  = _encryptionService.CreateSaltKey(5);
            string password = _encryptionService.CreatePasswordHash("password", saltKey);

            customer1.PasswordSalt = saltKey;
            customer1.Password     = password;
            AddCustomerToRegisteredRole(customer1);

            var customer2 = new Customer
            {
                Username       = "******",
                Email          = "*****@*****.**",
                PasswordFormat = PasswordFormat.Clear,
                Password       = "******",
                Active         = true
            };

            AddCustomerToRegisteredRole(customer2);

            var customer3 = new Customer
            {
                Username       = "******",
                Email          = "*****@*****.**",
                PasswordFormat = PasswordFormat.Encrypted,
                Password       = _encryptionService.EncryptText("password"),
                Active         = true
            };

            AddCustomerToRegisteredRole(customer3);

            var customer4 = new Customer
            {
                Username       = "******",
                Email          = "*****@*****.**",
                PasswordFormat = PasswordFormat.Clear,
                Password       = "******",
                Active         = true
            };

            AddCustomerToRegisteredRole(customer4);

            var customer5 = new Customer
            {
                Username       = "******",
                Email          = "*****@*****.**",
                PasswordFormat = PasswordFormat.Clear,
                Password       = "******",
                Active         = true
            };

            //trying to recreate

            var eventPublisher = new Mock <IEventPublisher>();

            eventPublisher.Setup(x => x.Publish(new object()));
            _eventPublisher = eventPublisher.Object;

            _storeService = new Mock <IStoreService>().Object;

            _customerRepo = new Grand.Services.Tests.MongoDBRepositoryTest <Customer>();
            _customerRepo.Insert(customer1);
            _customerRepo.Insert(customer2);
            _customerRepo.Insert(customer3);
            _customerRepo.Insert(customer4);
            _customerRepo.Insert(customer5);

            _customerRoleRepo         = new Mock <IRepository <CustomerRole> >().Object;
            _orderRepo                = new Mock <IRepository <Order> >().Object;
            _forumPostRepo            = new Mock <IRepository <ForumPost> >().Object;
            _forumTopicRepo           = new Mock <IRepository <ForumTopic> >().Object;
            _customerProductPriceRepo = new Mock <IRepository <CustomerProductPrice> >().Object;
            _customerProductRepo      = new Mock <IRepository <CustomerProduct> >().Object;
            _customerHistoryRepo      = new Mock <IRepository <CustomerHistoryPassword> >().Object;
            _customerNoteRepo         = new Mock <IRepository <CustomerNote> >().Object;

            _genericAttributeService       = new Mock <IGenericAttributeService>().Object;
            _newsLetterSubscriptionService = new Mock <INewsLetterSubscriptionService>().Object;
            _localizationService           = new Mock <ILocalizationService>().Object;
            _rewardPointsService           = new Mock <IRewardPointsService>().Object;
            _customerRoleProductRepo       = new Mock <IRepository <CustomerRoleProduct> >().Object;

            _customerSettings = new CustomerSettings();
            _commonSettings   = new CommonSettings();
            _customerService  = new CustomerService(new TestMemoryCacheManager(new Mock <IMemoryCache>().Object), _customerRepo, _customerRoleRepo, _customerProductRepo, _customerProductPriceRepo,
                                                    _customerHistoryRepo, _customerRoleProductRepo, _customerNoteRepo, _orderRepo, _forumPostRepo, _forumTopicRepo, null, null, _genericAttributeService, null,
                                                    _eventPublisher, _customerSettings, _commonSettings);

            _customerRegistrationService = new CustomerRegistrationService(
                _customerService,
                _encryptionService,
                _newsLetterSubscriptionService,
                _localizationService,
                _storeService,
                _eventPublisher,
                _rewardPointsSettings,
                _customerSettings,
                _rewardPointsService);
        }
示例#17
0
 public CustomerController(ICustomerService customerService,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     IGenericAttributeService genericAttributeService,
     ICustomerRegistrationService customerRegistrationService,
     ICustomerReportService customerReportService, 
     IDateTimeHelper dateTimeHelper,
     ILocalizationService localizationService,
     IRewardPointsService rewardPointsService,
     DateTimeSettings dateTimeSettings,
     TaxSettings taxSettings, 
     RewardPointsSettings rewardPointsSettings,
     ICountryService countryService, 
     IStateProvinceService stateProvinceService, 
     IAddressService addressService,
     CustomerSettings customerSettings,
     ITaxService taxService, 
     IWorkContext workContext,
     IVendorService vendorService,
     IStoreContext storeContext,
     IPriceFormatter priceFormatter,
     IOrderService orderService, 
     IExportManager exportManager,
     ICustomerActivityService customerActivityService,
     IPriceCalculationService priceCalculationService,
     IProductAttributeFormatter productAttributeFormatter,
     IPermissionService permissionService, 
     IQueuedEmailService queuedEmailService,
     EmailAccountSettings emailAccountSettings,
     IEmailAccountService emailAccountService, 
     ForumSettings forumSettings,
     IForumService forumService, 
     IOpenAuthenticationService openAuthenticationService,
     AddressSettings addressSettings,
     CommonSettings commonSettings,
     IStoreService storeService,
     ICustomerAttributeParser customerAttributeParser,
     ICustomerAttributeService customerAttributeService,
     IAddressAttributeParser addressAttributeParser,
     IAddressAttributeService addressAttributeService,
     IAddressAttributeFormatter addressAttributeFormatter,
     IAffiliateService affiliateService,
     IWorkflowMessageService workflowMessageService,
     IBackInStockSubscriptionService backInStockSubscriptionService,
     IContactUsService contactUsService)
 {
     this._customerService = customerService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._genericAttributeService = genericAttributeService;
     this._customerRegistrationService = customerRegistrationService;
     this._customerReportService = customerReportService;
     this._dateTimeHelper = dateTimeHelper;
     this._localizationService = localizationService;
     this._rewardPointsService = rewardPointsService;
     this._dateTimeSettings = dateTimeSettings;
     this._taxSettings = taxSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._addressService = addressService;
     this._customerSettings = customerSettings;
     this._commonSettings = commonSettings;
     this._taxService = taxService;
     this._workContext = workContext;
     this._vendorService = vendorService;
     this._storeContext = storeContext;
     this._priceFormatter = priceFormatter;
     this._orderService = orderService;
     this._exportManager = exportManager;
     this._customerActivityService = customerActivityService;
     this._priceCalculationService = priceCalculationService;
     this._productAttributeFormatter = productAttributeFormatter;
     this._permissionService = permissionService;
     this._queuedEmailService = queuedEmailService;
     this._emailAccountSettings = emailAccountSettings;
     this._emailAccountService = emailAccountService;
     this._forumSettings = forumSettings;
     this._forumService = forumService;
     this._openAuthenticationService = openAuthenticationService;
     this._addressSettings = addressSettings;
     this._storeService = storeService;
     this._customerAttributeParser = customerAttributeParser;
     this._customerAttributeService = customerAttributeService;
     this._addressAttributeParser = addressAttributeParser;
     this._addressAttributeService = addressAttributeService;
     this._addressAttributeFormatter = addressAttributeFormatter;
     this._affiliateService = affiliateService;
     this._workflowMessageService = workflowMessageService;
     this._backInStockSubscriptionService = backInStockSubscriptionService;
     this._contactUsService = contactUsService;
 }
示例#18
0
 public OrderController(IOrderService orderService, 
     IShipmentService shipmentService, 
     IWorkContext workContext,
     ICurrencyService currencyService,
     IPriceFormatter priceFormatter,
     IOrderProcessingService orderProcessingService, 
     IDateTimeHelper dateTimeHelper,
     IPaymentService paymentService, 
     ILocalizationService localizationService,
     IPdfService pdfService, 
     IShippingService shippingService,
     ICountryService countryService, 
     IProductAttributeParser productAttributeParser,
     IWebHelper webHelper,
     IDownloadService downloadService,
     IAddressAttributeFormatter addressAttributeFormatter,
     IStoreContext storeContext,
     IOrderTotalCalculationService orderTotalCalculationService,
     IRewardPointsService rewardPointsService,
     IGiftCardService giftCardService,
     CatalogSettings catalogSettings,
     OrderSettings orderSettings,
     TaxSettings taxSettings,
     ShippingSettings shippingSettings, 
     AddressSettings addressSettings,
     RewardPointsSettings rewardPointsSettings,
     PdfSettings pdfSettings)
 {
     this._orderService = orderService;
     this._shipmentService = shipmentService;
     this._workContext = workContext;
     this._currencyService = currencyService;
     this._priceFormatter = priceFormatter;
     this._orderProcessingService = orderProcessingService;
     this._dateTimeHelper = dateTimeHelper;
     this._paymentService = paymentService;
     this._localizationService = localizationService;
     this._pdfService = pdfService;
     this._shippingService = shippingService;
     this._countryService = countryService;
     this._productAttributeParser = productAttributeParser;
     this._webHelper = webHelper;
     this._downloadService = downloadService;
     this._addressAttributeFormatter = addressAttributeFormatter;
     this._storeContext = storeContext;
     this._rewardPointsService = rewardPointsService;
     this._giftCardService = giftCardService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._catalogSettings = catalogSettings;
     this._orderSettings = orderSettings;
     this._taxSettings = taxSettings;
     this._shippingSettings = shippingSettings;
     this._addressSettings = addressSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._pdfSettings = pdfSettings;
 }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="orderService">Order service</param>
 /// <param name="webHelper">Web helper</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="languageService">Language service</param>
 /// <param name="productService">Product service</param>
 /// <param name="paymentService">Payment service</param>
 /// <param name="logger">Logger</param>
 /// <param name="orderTotalCalculationService">Order total calculationservice</param>
 /// <param name="priceCalculationService">Price calculation service</param>
 /// <param name="priceFormatter">Price formatter</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="productAttributeFormatter">Product attribute formatter</param>
 /// <param name="giftCardService">Gift card service</param>
 /// <param name="shoppingCartService">Shopping cart service</param>
 /// <param name="checkoutAttributeFormatter">Checkout attribute service</param>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="shipmentService">Shipment service</param>
 /// <param name="taxService">Tax service</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="discountService">Discount service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="vendorService">Vendor service</param>
 /// <param name="customerActivityService">Customer activity service</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="affiliateService">Affiliate service</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="pdfService">PDF service</param>
 /// <param name="rewardPointsService">Reward points service</param>
 /// <param name="paymentSettings">Payment settings</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="orderSettings">Order settings</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="currencySettings">Currency settings</param>
 public OrderProcessingService(IOrderService orderService,
     IWebHelper webHelper,
     ILocalizationService localizationService,
     ILanguageService languageService,
     IProductService productService,
     IPaymentService paymentService,
     ILogger logger,
     IOrderTotalCalculationService orderTotalCalculationService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IProductAttributeParser productAttributeParser,
     IProductAttributeFormatter productAttributeFormatter,
     IGiftCardService giftCardService,
     IShoppingCartService shoppingCartService,
     ICheckoutAttributeFormatter checkoutAttributeFormatter,
     IShippingService shippingService,
     IShipmentService shipmentService,
     ITaxService taxService,
     ICustomerService customerService,
     IDiscountService discountService,
     IEncryptionService encryptionService,
     IWorkContext workContext,
     IWorkflowMessageService workflowMessageService,
     IVendorService vendorService,
     ICustomerActivityService customerActivityService,
     ICurrencyService currencyService,
     IAffiliateService affiliateService,
     IEventPublisher eventPublisher,
     IPdfService pdfService,
     IRewardPointsService rewardPointsService,
     ShippingSettings shippingSettings,
     PaymentSettings paymentSettings,
     RewardPointsSettings rewardPointsSettings,
     OrderSettings orderSettings,
     TaxSettings taxSettings,
     LocalizationSettings localizationSettings,
     CurrencySettings currencySettings)
 {
     this._orderService = orderService;
     this._webHelper = webHelper;
     this._localizationService = localizationService;
     this._languageService = languageService;
     this._productService = productService;
     this._paymentService = paymentService;
     this._logger = logger;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter = priceFormatter;
     this._productAttributeParser = productAttributeParser;
     this._productAttributeFormatter = productAttributeFormatter;
     this._giftCardService = giftCardService;
     this._shoppingCartService = shoppingCartService;
     this._checkoutAttributeFormatter = checkoutAttributeFormatter;
     this._workContext = workContext;
     this._workflowMessageService = workflowMessageService;
     this._vendorService = vendorService;
     this._shippingService = shippingService;
     this._shipmentService = shipmentService;
     this._taxService = taxService;
     this._customerService = customerService;
     this._discountService = discountService;
     this._encryptionService = encryptionService;
     this._customerActivityService = customerActivityService;
     this._currencyService = currencyService;
     this._affiliateService = affiliateService;
     this._eventPublisher = eventPublisher;
     this._pdfService = pdfService;
     this._rewardPointsService = rewardPointsService;
     this._paymentSettings = paymentSettings;
     this._shippingSettings = shippingSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._orderSettings = orderSettings;
     this._taxSettings = taxSettings;
     this._localizationSettings = localizationSettings;
     this._currencySettings = currencySettings;
 }