public ReturnRequestController(IReturnRequestService returnRequestService,
     IOrderService orderService,
     IWorkContext workContext,
     IStoreContext storeContext,
     ICurrencyService currencyService,
     IPriceFormatter priceFormatter,
     IOrderProcessingService orderProcessingService,
     ILocalizationService localizationService,
     ICustomerService customerService,
     IWorkflowMessageService workflowMessageService,
     IDateTimeHelper dateTimeHelper,
     LocalizationSettings localizationSettings,
     ICacheManager cacheManager,
     ICustomNumberFormatter customNumberFormatter)
 {
     this._returnRequestService = returnRequestService;
     this._orderService = orderService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._currencyService = currencyService;
     this._priceFormatter = priceFormatter;
     this._orderProcessingService = orderProcessingService;
     this._localizationService = localizationService;
     this._customerService = customerService;
     this._workflowMessageService = workflowMessageService;
     this._dateTimeHelper = dateTimeHelper;
     this._localizationSettings = localizationSettings;
     this._cacheManager = cacheManager;
     this._customNumberFormatter = customNumberFormatter;
 }
Beispiel #2
0
 public ReturnRequestController(IReturnRequestModelFactory returnRequestModelFactory,
                                IReturnRequestService returnRequestService,
                                IOrderService orderService,
                                IWorkContext workContext,
                                IStoreContext storeContext,
                                IOrderProcessingService orderProcessingService,
                                ILocalizationService localizationService,
                                ICustomerService customerService,
                                IWorkflowMessageService workflowMessageService,
                                ICustomNumberFormatter customNumberFormatter,
                                IDownloadService downloadService,
                                LocalizationSettings localizationSettings,
                                OrderSettings orderSettings)
 {
     this._returnRequestModelFactory = returnRequestModelFactory;
     this._returnRequestService      = returnRequestService;
     this._orderService           = orderService;
     this._workContext            = workContext;
     this._storeContext           = storeContext;
     this._orderProcessingService = orderProcessingService;
     this._localizationService    = localizationService;
     this._customerService        = customerService;
     this._workflowMessageService = workflowMessageService;
     this._customNumberFormatter  = customNumberFormatter;
     this._downloadService        = downloadService;
     this._localizationSettings   = localizationSettings;
     this._orderSettings          = orderSettings;
 }
 public ReturnRequestController(IReturnRequestService returnRequestService,
                                IOrderService orderService,
                                IWorkContext workContext,
                                IStoreContext storeContext,
                                ICurrencyService currencyService,
                                IPriceFormatter priceFormatter,
                                IOrderProcessingService orderProcessingService,
                                ILocalizationService localizationService,
                                ICustomerService customerService,
                                IWorkflowMessageService workflowMessageService,
                                IDateTimeHelper dateTimeHelper,
                                LocalizationSettings localizationSettings,
                                ICacheManager cacheManager,
                                ICustomNumberFormatter customNumberFormatter)
 {
     this._returnRequestService   = returnRequestService;
     this._orderService           = orderService;
     this._workContext            = workContext;
     this._storeContext           = storeContext;
     this._currencyService        = currencyService;
     this._priceFormatter         = priceFormatter;
     this._orderProcessingService = orderProcessingService;
     this._localizationService    = localizationService;
     this._customerService        = customerService;
     this._workflowMessageService = workflowMessageService;
     this._dateTimeHelper         = dateTimeHelper;
     this._localizationSettings   = localizationSettings;
     this._cacheManager           = cacheManager;
     this._customNumberFormatter  = customNumberFormatter;
 }
 public CurrentOrderEventHandlers(IStoreContext storeContext,
                                  IWorkContext workContext,
                                  IWebHelper webHelper,
                                  ICustomerService customerService,
                                  ICustomNumberFormatter customNumberFormatter,
                                  IShoppingCartService shoppingCartService,
                                  IOrderService orderService,
                                  IProductService productService,
                                  ICurrentOrderService currentOrderService,
                                  IRepository <CqrsEvent> cqrsEventReposiory,
                                  IClientNotificationService clientNotificationService,
                                  IDateTimeHelper dateTimeHelper,
                                  ILogger logger)
 {
     _customNumberFormatter     = customNumberFormatter;
     _storeContext              = storeContext;
     _workContext               = workContext;
     _customerService           = customerService;
     _shoppingCartService       = shoppingCartService;
     _webHelper                 = webHelper;
     _orderService              = orderService;
     _productService            = productService;
     _currentOrderService       = currentOrderService;
     _cqrsEventReposiory        = cqrsEventReposiory;
     _clientNotificationService = clientNotificationService;
     _dateTimeHelper            = dateTimeHelper;
     _logger = logger;
 }
Beispiel #5
0
        public new void SetUp()
        {
            _workContext = null;

            _store = new Store {
                Id = 1
            };
            _storeContext = MockRepository.GenerateMock <IStoreContext>();
            _storeContext.Expect(x => x.CurrentStore).Return(_store);

            var pluginFinder = new PluginFinder();

            _shoppingCartSettings = new ShoppingCartSettings();
            _catalogSettings      = new CatalogSettings();

            var cacheManager = new NopNullCache();

            _productService = MockRepository.GenerateMock <IProductService>();

            //price calculation service
            _discountService     = MockRepository.GenerateMock <IDiscountService>();
            _categoryService     = MockRepository.GenerateMock <ICategoryService>();
            _manufacturerService = MockRepository.GenerateMock <IManufacturerService>();

            _productAttributeParser = MockRepository.GenerateMock <IProductAttributeParser>();
            _priceCalcService       = new PriceCalculationService(_workContext, _storeContext,
                                                                  _discountService, _categoryService, _manufacturerService,
                                                                  _productAttributeParser, _productService,
                                                                  cacheManager, _shoppingCartSettings, _catalogSettings);

            _eventPublisher = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            _localizationService = MockRepository.GenerateMock <ILocalizationService>();

            //shipping
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");
            _shippingMethodRepository = MockRepository.GenerateMock <IRepository <ShippingMethod> >();
            _warehouseRepository      = MockRepository.GenerateMock <IRepository <Warehouse> >();
            _logger          = new NullLogger();
            _shippingService = new ShippingService(_shippingMethodRepository,
                                                   _warehouseRepository,
                                                   _logger,
                                                   _productService,
                                                   _productAttributeParser,
                                                   _checkoutAttributeParser,
                                                   _genericAttributeService,
                                                   _localizationService,
                                                   _addressService,
                                                   _shippingSettings,
                                                   pluginFinder,
                                                   _storeContext,
                                                   _eventPublisher,
                                                   _shoppingCartSettings,
                                                   cacheManager);
            _shipmentService = MockRepository.GenerateMock <IShipmentService>();


            _paymentService          = MockRepository.GenerateMock <IPaymentService>();
            _checkoutAttributeParser = MockRepository.GenerateMock <ICheckoutAttributeParser>();
            _giftCardService         = MockRepository.GenerateMock <IGiftCardService>();
            _genericAttributeService = MockRepository.GenerateMock <IGenericAttributeService>();

            _geoLookupService     = MockRepository.GenerateMock <IGeoLookupService>();
            _countryService       = MockRepository.GenerateMock <ICountryService>();
            _stateProvinceService = MockRepository.GenerateMock <IStateProvinceService>();
            _customerSettings     = new CustomerSettings();
            _addressSettings      = new AddressSettings();

            //tax
            _taxSettings = new TaxSettings();
            _taxSettings.ShippingIsTaxable = true;
            _taxSettings.PaymentMethodAdditionalFeeIsTaxable = true;
            _taxSettings.DefaultTaxAddressId = 10;
            _addressService = MockRepository.GenerateMock <IAddressService>();
            _addressService.Expect(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Return(new Address {
                Id = _taxSettings.DefaultTaxAddressId
            });
            _taxService = new TaxService(_addressService, _workContext, _taxSettings,
                                         pluginFinder, _geoLookupService, _countryService, _logger, _customerSettings, _addressSettings);

            _rewardPointService   = MockRepository.GenerateMock <IRewardPointService>();
            _rewardPointsSettings = new RewardPointsSettings();

            _orderTotalCalcService = new OrderTotalCalculationService(_workContext, _storeContext,
                                                                      _priceCalcService, _taxService, _shippingService, _paymentService,
                                                                      _checkoutAttributeParser, _discountService, _giftCardService,
                                                                      _genericAttributeService, _rewardPointService,
                                                                      _taxSettings, _rewardPointsSettings, _shippingSettings, _shoppingCartSettings, _catalogSettings);

            _orderService               = MockRepository.GenerateMock <IOrderService>();
            _webHelper                  = MockRepository.GenerateMock <IWebHelper>();
            _languageService            = MockRepository.GenerateMock <ILanguageService>();
            _priceFormatter             = MockRepository.GenerateMock <IPriceFormatter>();
            _productAttributeFormatter  = MockRepository.GenerateMock <IProductAttributeFormatter>();
            _shoppingCartService        = MockRepository.GenerateMock <IShoppingCartService>();
            _checkoutAttributeFormatter = MockRepository.GenerateMock <ICheckoutAttributeFormatter>();
            _customerService            = MockRepository.GenerateMock <ICustomerService>();
            _encryptionService          = MockRepository.GenerateMock <IEncryptionService>();
            _workflowMessageService     = MockRepository.GenerateMock <IWorkflowMessageService>();
            _customerActivityService    = MockRepository.GenerateMock <ICustomerActivityService>();
            _currencyService            = MockRepository.GenerateMock <ICurrencyService>();
            _affiliateService           = MockRepository.GenerateMock <IAffiliateService>();
            _vendorService              = MockRepository.GenerateMock <IVendorService>();
            _pdfService                 = MockRepository.GenerateMock <IPdfService>();
            _customNumberFormatter      = MockRepository.GenerateMock <ICustomNumberFormatter>();

            _paymentSettings = new PaymentSettings
            {
                ActivePaymentMethodSystemNames = new List <string>
                {
                    "Payments.TestMethod"
                }
            };
            _orderSettings = new OrderSettings();

            _localizationSettings = new LocalizationSettings();

            _eventPublisher = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            _rewardPointService = MockRepository.GenerateMock <IRewardPointService>();
            _currencySettings   = new CurrencySettings();

            _orderProcessingService = new OrderProcessingService(_orderService, _webHelper,
                                                                 _localizationService, _languageService,
                                                                 _productService, _paymentService, _logger,
                                                                 _orderTotalCalcService, _priceCalcService, _priceFormatter,
                                                                 _productAttributeParser, _productAttributeFormatter,
                                                                 _giftCardService, _shoppingCartService, _checkoutAttributeFormatter,
                                                                 _shippingService, _shipmentService, _taxService,
                                                                 _customerService, _discountService,
                                                                 _encryptionService, _workContext,
                                                                 _workflowMessageService, _vendorService,
                                                                 _customerActivityService, _currencyService, _affiliateService,
                                                                 _eventPublisher, _pdfService, _rewardPointService,
                                                                 _genericAttributeService,
                                                                 _countryService, _stateProvinceService,
                                                                 _shippingSettings, _paymentSettings, _rewardPointsSettings,
                                                                 _orderSettings, _taxSettings, _localizationSettings,
                                                                 _currencySettings, _customNumberFormatter);
        }
 public MmsOrderProcessingOverride(
     CurrencySettings currencySettings,
     IAddressService addressService,
     IAffiliateService affiliateService,
     ICheckoutAttributeFormatter checkoutAttributeFormatter,
     ICountryService countryService,
     ICurrencyService currencyService,
     ICustomerActivityService customerActivityService,
     ICustomerService customerService,
     ICustomNumberFormatter customNumberFormatter,
     IDiscountService discountService,
     IEncryptionService encryptionService,
     IEventPublisher eventPublisher,
     IGenericAttributeService genericAttributeService,
     IGiftCardService giftCardService,
     ILanguageService languageService,
     ILocalizationService localizationService,
     ILogger logger,
     IOrderService orderService,
     IOrderTotalCalculationService orderTotalCalculationService,
     IPaymentPluginManager paymentPluginManager,
     IPaymentService paymentService,
     IPdfService pdfService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IProductAttributeFormatter productAttributeFormatter,
     IProductAttributeParser productAttributeParser,
     IProductService productService,
     IRewardPointService rewardPointService,
     IShipmentService shipmentService,
     IShippingService shippingService,
     IShoppingCartService shoppingCartService,
     IStateProvinceService stateProvinceService,
     ITaxService taxService,
     IVendorService vendorService,
     IWebHelper webHelper,
     IWorkContext workContext,
     IWorkflowMessageService workflowMessageService,
     LocalizationSettings localizationSettings,
     OrderSettings orderSettings,
     PaymentSettings paymentSettings,
     RewardPointsSettings rewardPointsSettings,
     ShippingSettings shippingSettings,
     TaxSettings taxSettings,
     MmsAdminService mmsadminService) : base(
         currencySettings,
         addressService,
         affiliateService,
         checkoutAttributeFormatter,
         countryService,
         currencyService,
         customerActivityService,
         customerService,
         customNumberFormatter,
         discountService,
         encryptionService,
         eventPublisher,
         genericAttributeService,
         giftCardService,
         languageService,
         localizationService,
         logger,
         orderService,
         orderTotalCalculationService,
         paymentPluginManager,
         paymentService,
         pdfService,
         priceCalculationService,
         priceFormatter,
         productAttributeFormatter,
         productAttributeParser,
         productService,
         rewardPointService,
         shipmentService,
         shippingService,
         shoppingCartService,
         stateProvinceService,
         taxService,
         vendorService,
         webHelper,
         workContext,
         workflowMessageService,
         localizationSettings,
         orderSettings,
         paymentSettings,
         rewardPointsSettings,
         shippingSettings,
         taxSettings)
 {
     _currencySettings           = currencySettings;
     _addressService             = addressService;
     _affiliateService           = affiliateService;
     _checkoutAttributeFormatter = checkoutAttributeFormatter;
     _countryService             = countryService;
     _currencyService            = currencyService;
     _customerActivityService    = customerActivityService;
     _customerService            = customerService;
     _customNumberFormatter      = customNumberFormatter;
     _discountService            = discountService;
     _encryptionService          = encryptionService;
     _eventPublisher             = eventPublisher;
     _genericAttributeService    = genericAttributeService;
     _giftCardService            = giftCardService;
     _languageService            = languageService;
     _localizationService        = localizationService;
     _logger       = logger;
     _orderService = orderService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _paymentPluginManager         = paymentPluginManager;
     _paymentService            = paymentService;
     _pdfService                = pdfService;
     _priceCalculationService   = priceCalculationService;
     _priceFormatter            = priceFormatter;
     _productAttributeFormatter = productAttributeFormatter;
     _productAttributeParser    = productAttributeParser;
     _productService            = productService;
     _rewardPointService        = rewardPointService;
     _shipmentService           = shipmentService;
     _shippingService           = shippingService;
     _shoppingCartService       = shoppingCartService;
     _stateProvinceService      = stateProvinceService;
     _taxService                = taxService;
     _vendorService             = vendorService;
     _webHelper              = webHelper;
     _workContext            = workContext;
     _workflowMessageService = workflowMessageService;
     _localizationSettings   = localizationSettings;
     _orderSettings          = orderSettings;
     _paymentSettings        = paymentSettings;
     _rewardPointsSettings   = rewardPointsSettings;
     _shippingSettings       = shippingSettings;
     _taxSettings            = taxSettings;
     _mmsadminService        = mmsadminService;
 }
Beispiel #7
0
 public OverriddenOrderProcessingService(CurrencySettings currencySettings,
                                         IAffiliateService affiliateService,
                                         ICheckoutAttributeFormatter checkoutAttributeFormatter,
                                         ICountryService countryService,
                                         ICurrencyService currencyService,
                                         ICustomerActivityService customerActivityService,
                                         ICustomerService customerService,
                                         ICustomNumberFormatter customNumberFormatter,
                                         IDiscountService discountService,
                                         IEncryptionService encryptionService,
                                         IEventPublisher eventPublisher,
                                         IGenericAttributeService genericAttributeService,
                                         IGiftCardService giftCardService,
                                         IHttpContextAccessor httpContextAccessor,
                                         ILanguageService languageService,
                                         ILocalizationService localizationService,
                                         ILogger logger,
                                         IOrderService orderService,
                                         IOrderTotalCalculationService orderTotalCalculationService,
                                         IPaymentService paymentService,
                                         IPdfService pdfService,
                                         IPriceCalculationService priceCalculationService,
                                         IPriceFormatter priceFormatter,
                                         IProductAttributeFormatter productAttributeFormatter,
                                         IProductAttributeParser productAttributeParser,
                                         IProductService productService,
                                         IRewardPointService rewardPointService,
                                         IShipmentService shipmentService,
                                         IShippingService shippingService,
                                         IShoppingCartService shoppingCartService,
                                         IStateProvinceService stateProvinceService,
                                         ITaxService taxService,
                                         IVendorService vendorService,
                                         IWebHelper webHelper,
                                         IWorkContext workContext,
                                         IWorkflowMessageService workflowMessageService,
                                         LocalizationSettings localizationSettings,
                                         OrderSettings orderSettings,
                                         PaymentSettings paymentSettings,
                                         RewardPointsSettings rewardPointsSettings,
                                         ShippingSettings shippingSettings,
                                         TaxSettings taxSettings) : base(currencySettings,
                                                                         affiliateService,
                                                                         checkoutAttributeFormatter,
                                                                         countryService,
                                                                         currencyService,
                                                                         customerActivityService,
                                                                         customerService,
                                                                         customNumberFormatter,
                                                                         discountService,
                                                                         encryptionService,
                                                                         eventPublisher,
                                                                         genericAttributeService,
                                                                         giftCardService,
                                                                         languageService,
                                                                         localizationService,
                                                                         logger,
                                                                         orderService,
                                                                         orderTotalCalculationService,
                                                                         paymentService,
                                                                         pdfService,
                                                                         priceCalculationService,
                                                                         priceFormatter,
                                                                         productAttributeFormatter,
                                                                         productAttributeParser,
                                                                         productService,
                                                                         rewardPointService,
                                                                         shipmentService,
                                                                         shippingService,
                                                                         shoppingCartService,
                                                                         stateProvinceService,
                                                                         taxService,
                                                                         vendorService,
                                                                         webHelper,
                                                                         workContext,
                                                                         workflowMessageService,
                                                                         localizationSettings,
                                                                         orderSettings,
                                                                         paymentSettings,
                                                                         rewardPointsSettings,
                                                                         shippingSettings,
                                                                         taxSettings)
 {
     this._currencySettings             = currencySettings;
     this._affiliateService             = affiliateService;
     this._checkoutAttributeFormatter   = checkoutAttributeFormatter;
     this._countryService               = countryService;
     this._currencyService              = currencyService;
     this._customerService              = customerService;
     this._discountService              = discountService;
     this._genericAttributeService      = genericAttributeService;
     this._httpContextAccessor          = httpContextAccessor;
     this._languageService              = languageService;
     this._localizationService          = localizationService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._paymentService               = paymentService;
     this._priceFormatter               = priceFormatter;
     this._shoppingCartService          = shoppingCartService;
     this._stateProvinceService         = stateProvinceService;
     this._taxService       = taxService;
     this._workContext      = workContext;
     this._orderSettings    = orderSettings;
     this._shippingSettings = shippingSettings;
     this._taxSettings      = taxSettings;
 }