コード例 #1
0
        public KlarnaCheckoutPaymentMethod(
            LocalizationService localizationService,
            IOrderGroupFactory orderGroupFactory,
            LanguageService languageService,
            IPaymentManagerFacade paymentManager,
            ICartService cartService,
            IKlarnaCheckoutService klarnaCheckoutService)
            : base(localizationService, orderGroupFactory, languageService, paymentManager)
        {
            _orderGroupFactory     = orderGroupFactory;
            _cartService           = cartService;
            _klarnaCheckoutService = klarnaCheckoutService;

            InitializeValues();
        }
コード例 #2
0
        public DataCashPaymentMethod(IOrderGroupFactory orderGroupFactory)
        {
            _orderGroupFactory = orderGroupFactory;
            _paymentMethod     = DataCashConfiguration.GetDataCashPaymentMethod()?.PaymentMethod?.FirstOrDefault();

            if (_paymentMethod == null)
            {
                return;
            }

            PaymentMethodId = _paymentMethod.PaymentMethodId;
            SystemKeyword   = _paymentMethod.SystemKeyword;
            Name            = _paymentMethod.Name;
            Description     = _paymentMethod.Description;
        }
コード例 #3
0
 public OrdersService(IOrderRepository orderRepository,
                      ICustomerService customerService,
                      IPurchaseOrderFactory purchaseOrderFactory,
                      CustomerContext customerContext,
                      IPlacedPriceProcessor placedPriceProcessor,
                      IPromotionEngine promotionEngine,
                      IOrderGroupFactory orderGroupFactory)
 {
     _orderRepository      = orderRepository;
     _customerService      = customerService;
     _purchaseOrderFactory = purchaseOrderFactory;
     _customerContext      = customerContext;
     _placedPriceProcessor = placedPriceProcessor;
     _promotionEngine      = promotionEngine;
     _orderGroupFactory    = orderGroupFactory;
 }
コード例 #4
0
ファイル: PayPalPaymentOption.cs プロジェクト: Geta/PayPal
        public PayPalPaymentOption(IOrderGroupFactory orderGroupFactory)
        {
            _orderGroupFactory = orderGroupFactory;
            _paymentMethodDto  = PayPalConfiguration.GetPayPalPaymentMethod();
            _paymentMethod     = _paymentMethodDto?.PaymentMethod?.FirstOrDefault();

            if (_paymentMethod == null)
            {
                return;
            }

            PaymentMethodId = _paymentMethod.PaymentMethodId;
            SystemKeyword   = _paymentMethod.SystemKeyword;
            Name            = _paymentMethod.Name;
            Description     = _paymentMethod.Description;
        }
コード例 #5
0
 public MarketsDemoController(IMarketService marketService, ICurrentMarket currentMarket,
                              ReferenceConverter referenceConverter, IContentLoader contentLoader,
                              IOrderRepository orderRepository, IOrderGroupFactory orderGroupFactory,
                              ITaxCalculator taxCalculator, IPriceService priceService,
                              IPromotionEngine promotionEngine)
 {
     _marketService      = marketService;
     _currentMarket      = currentMarket;
     _referenceConverter = referenceConverter;
     _contentLoader      = contentLoader;
     _orderRepository    = orderRepository;
     _orderGroupFactory  = orderGroupFactory;
     _taxCalculator      = taxCalculator;
     _priceService       = priceService;
     _promotionEngine    = promotionEngine;
 }
 public SwedbankPayCheckoutPaymentMethod(
     LocalizationService localizationService,
     IOrderGroupFactory orderGroupFactory,
     LanguageService languageService,
     IPaymentManagerFacade paymentManager,
     ICartService cartService,
     IMarketService marketService,
     ISwedbankPayCheckoutService swedbankPayCheckoutService)
     : base(localizationService, orderGroupFactory, languageService, paymentManager)
 {
     _orderGroupFactory          = orderGroupFactory;
     _languageService            = languageService;
     _cartService                = cartService;
     _marketService              = marketService;
     _swedbankPayCheckoutService = swedbankPayCheckoutService;
 }
コード例 #7
0
        public GenericCreditCardPaymentOption(LocalizationService localizationService,
                                              IOrderGroupFactory orderGroupFactory,
                                              ICurrentMarket currentMarket,
                                              LanguageService languageService,
                                              IPaymentService paymentService,
                                              ICreditCardService creditCardService)
            : base(localizationService, orderGroupFactory, currentMarket, languageService, paymentService)
        {
            _creditCardService = creditCardService;

            InitializeValues();

            ExpirationMonth        = DateTime.Now.Month;
            CreditCardSecurityCode = "212";
            CardType         = "Generic";
            CreditCardNumber = "4662519843660534";
        }
コード例 #8
0
 public OrderService(ICustomerFactory customerFactory,
                     IEmailService emailService,
                     IOrderSettings orderSettings,
                     IOrderGroupFactory orderGroupFactory,
                     IOrderRepository orderRepository,
                     ICurrentMarket currentMarket,
                     IPromotionEngine promotionEngine
                     )
 {
     _orderRepository   = orderRepository;
     _promotionEngine   = promotionEngine;
     _customerFactory   = customerFactory;
     _emailService      = emailService;
     _orderSettings     = orderSettings;
     _orderGroupFactory = orderGroupFactory;
     _market            = currentMarket.GetCurrentMarket();
 }
 public CheckOutController(
     IOrderRepository orderRepository
     , IOrderGroupFactory orderGroupFactory // RoCe: change
     , IOrderGroupCalculator orderGroupCalculator
     , IContentLoader contentLoader
     , ILineItemCalculator lineItemCalculator
     , IPlacedPriceProcessor placedPriceProcessor
     , IInventoryProcessor inventoryProcessor
     , ILineItemValidator lineItemValidator
     , IPromotionEngine promotionEngine
     , ICurrentMarket currentMarket
     , IPaymentProcessor paymentProcessor)
     : base(
         orderRepository, orderGroupFactory, orderGroupCalculator, contentLoader
         , lineItemCalculator, placedPriceProcessor, inventoryProcessor
         , lineItemValidator, promotionEngine, currentMarket, paymentProcessor)
 {
 }
コード例 #10
0
 public OrderHistoryController(IAddressBookService addressBookService,
                               IOrderRepository orderRepository,
                               ConfirmationService confirmationService,
                               ICartService cartService,
                               IOrderGroupCalculator orderGroupCalculator,
                               IContentLoader contentLoader,
                               UrlResolver urlResolver, IOrderGroupFactory orderGroupFactory, ICustomerService customerService,
                               PaymentMethodViewModelFactory paymentMethodViewModelFactory,
                               CookieService cookieService) :
     base(confirmationService, addressBookService, orderGroupCalculator, urlResolver, customerService)
 {
     _addressBookService            = addressBookService;
     _orderRepository               = orderRepository;
     _contentLoader                 = contentLoader;
     _cartService                   = cartService;
     _orderGroupFactory             = orderGroupFactory;
     _paymentMethodViewModelFactory = paymentMethodViewModelFactory;
     _cookieService                 = cookieService;
 }
コード例 #11
0
        //public static IContentLoader xyz;

        public CartController(
            IOrderRepository orderRepository
            , IOrderGroupFactory orderGroupFactory
            , IOrderGroupCalculator orderGroupCalculator
            , IContentLoader contentLoader
            , ILineItemCalculator lineItemCalculator
            , IPlacedPriceProcessor placedPriceProcessor
            , IInventoryProcessor inventoryProcessor
            , ILineItemValidator lineItemValidator
            , IPromotionEngine promotionEngine
            , ICurrentMarket currentMarket
            , IPaymentProcessor paymentProcessor
            ) : base
                (orderRepository, orderGroupFactory, orderGroupCalculator, contentLoader
                , lineItemCalculator, placedPriceProcessor, inventoryProcessor
                , lineItemValidator, promotionEngine, currentMarket, paymentProcessor) // Should maybe not have the last one here
        {
            _contentLoader2 = contentLoader;
        }
コード例 #12
0
        public KlarnaPaymentsPaymentMethod(
            LocalizationService localizationService,
            IOrderGroupFactory orderGroupFactory,
            LanguageService languageService,
            IPaymentManagerFacade paymentManager,
            ICartService cartService,
            IContentLoader contentLoader,
            ICurrentMarket currentMarket,
            IKlarnaPaymentsService klarnaPaymentsService)
            : base(localizationService, orderGroupFactory, languageService, paymentManager)
        {
            _orderGroupFactory     = orderGroupFactory;
            _cartService           = cartService;
            _contentLoader         = contentLoader;
            _currentMarket         = currentMarket;
            _klarnaPaymentsService = klarnaPaymentsService;

            InitializeValues();
        }
コード例 #13
0
 public AbstractOrderRepositoryBenchmarks(
     IOrderRepository orderRepository,
     IOrderGroupFactory orderGroupFactory,
     ILineItemValidator lineItemValidator,
     IPlacedPriceProcessor placedPriceProcessor,
     IInventoryProcessor inventoryProcessor,
     IPromotionEngine promotionEngine,
     IOrderGroupCalculator orderGroupCalculator,
     IPaymentProcessor paymentProcessor)
 {
     _orderRepository      = orderRepository;
     _orderGroupFactory    = orderGroupFactory;
     _lineItemValidator    = lineItemValidator;
     _placedPriceProcessor = placedPriceProcessor;
     _inventoryProcessor   = inventoryProcessor;
     _promotionEngine      = promotionEngine;
     _orderGroupCalculator = orderGroupCalculator;
     _paymentProcessor     = paymentProcessor;
 }
コード例 #14
0
 public CheckoutController(IPageRouteHelper pageRouteHelper,
                           IOrderRepository orderRepository,
                           CheckoutViewModelFactory checkoutViewModelFactory,
                           ICartService cartService,
                           OrderSummaryViewModelFactory orderSummaryViewModelFactory,
                           ICommerceTrackingService recommendationService,
                           CheckoutService checkoutService,
                           UrlHelper urlHelper,
                           ApplicationSignInManager <SiteUser> applicationSignInManager,
                           LocalizationService localizationService,
                           IAddressBookService addressBookService,
                           MultiShipmentViewModelFactory multiShipmentViewModelFactory,
                           IOrderGroupFactory orderGroupFactory,
                           IContentLoader contentLoader,
                           UrlResolver urlResolver,
                           ICustomerService customerContext,
                           IOrganizationService organizationService,
                           ShipmentViewModelFactory shipmentViewModelFactory,
                           IGiftCardService giftCardService,
                           ISettingsService settingsService)
 {
     _pageRouteHelper          = pageRouteHelper;
     _orderRepository          = orderRepository;
     _checkoutViewModelFactory = checkoutViewModelFactory;
     _cartService = cartService;
     _orderSummaryViewModelFactory = orderSummaryViewModelFactory;
     _recommendationService        = recommendationService;
     _checkoutService               = checkoutService;
     _urlHelper                     = urlHelper;
     _applicationSignInManager      = applicationSignInManager;
     _localizationService           = localizationService;
     _addressBookService            = addressBookService;
     _multiShipmentViewModelFactory = multiShipmentViewModelFactory;
     _orderGroupFactory             = orderGroupFactory;
     _contentLoader                 = contentLoader;
     _urlResolver                   = urlResolver;
     _customerContext               = customerContext;
     _organizationService           = organizationService;
     _shipmentViewModelFactory      = shipmentViewModelFactory;
     _giftCardService               = giftCardService;
     _settingsService               = settingsService;
 }
コード例 #15
0
 public CartController(IOrderRepository orderRepository
                       , IOrderGroupFactory orderGroupFactory
                       , IOrderGroupCalculator orderGroupCalculator
                       , IContentLoader contentLoader
                       , ILineItemCalculator lineItemCalculator
                       , IPlacedPriceProcessor placedPriceProcessor
                       , IInventoryProcessor inventoryProcessor
                       , ILineItemValidator lineItemValidator
                       , IPromotionEngine promotionEngine)
 {
     _orderRepository      = orderRepository;
     _orderGroupFactory    = orderGroupFactory;
     _orderGroupCalculator = orderGroupCalculator;
     _contentLoader        = contentLoader;
     _promotionEngine      = promotionEngine;
     _lineItemCalculator   = lineItemCalculator;
     _inventoryProcessor   = inventoryProcessor;
     _lineItemValidator    = lineItemValidator;
     _placedPriceProcessor = placedPriceProcessor;
 }
コード例 #16
0
 public CheckoutControllerForTest(
     IContentRepository contentRepository,
     IMailService mailService,
     LocalizationService localizationService,
     ICurrencyService currencyService,
     ControllerExceptionHandler controllerExceptionHandler,
     CustomerContextFacade customerContextFacade,
     IOrderRepository orderRepository,
     CheckoutViewModelFactory checkoutViewModelFactory,
     IOrderGroupCalculator orderGroupCalculator,
     IPaymentProcessor paymentProcessor,
     IPromotionEngine promotionEngine,
     ICartService cartService,
     IAddressBookService addressBookService,
     OrderSummaryViewModelFactory orderSummaryViewModelFactory,
     IOrderGroupFactory orderGroupFactory,
     ICartServiceB2B cartServiceB2B,
     IContentLoader contentLoader,
     IOrganizationService organizationService,
     IBudgetService budgetService
     )
     : base(contentRepository,
            mailService,
            localizationService,
            currencyService,
            controllerExceptionHandler,
            customerContextFacade,
            orderRepository,
            checkoutViewModelFactory,
            orderGroupCalculator,
            paymentProcessor,
            promotionEngine,
            cartService,
            addressBookService,
            orderSummaryViewModelFactory,
            orderGroupFactory,
            cartServiceB2B,
            contentLoader,
            organizationService)
 {
 }
コード例 #17
0
        protected PaymentMethodBase(LocalizationService localizationService,
                                    IOrderGroupFactory orderGroupFactory,
                                    LanguageService languageService,
                                    IPaymentManagerFacade paymentManager)
        {
            LocalizationService = localizationService;
            OrderGroupFactory   = orderGroupFactory;

            if (!string.IsNullOrEmpty(SystemKeyword))
            {
                var currentLanguage = languageService.GetCurrentLanguage().TwoLetterISOLanguageName;
                var dto             = paymentManager.GetPaymentMethodBySystemName(SystemKeyword, currentLanguage);
                var paymentMethod   = dto?.PaymentMethod?.FirstOrDefault();
                if (paymentMethod != null)
                {
                    PaymentMethodId = paymentMethod.PaymentMethodId;
                    Name            = paymentMethod.Name;
                    Description     = paymentMethod.Description;
                }
            }
        }
コード例 #18
0
        public GiftCardPaymentOption(LocalizationService localizationService,
                                     IOrderGroupFactory orderGroupFactory,
                                     ICurrentMarket currentMarket,
                                     LanguageService languageService,
                                     IPaymentService paymentService)
            : base(localizationService, orderGroupFactory, currentMarket, languageService, paymentService)
        {
            _orderGroupFactory = orderGroupFactory;

            AvailableGiftCards = new List <SelectListItem>();
            var isActiveGiftCards = _giftCardService.Service.GetCustomerGiftCards(CustomerContext.Current.CurrentContactId.ToString()).Where(g => g.IsActive == true);

            foreach (var giftCard in isActiveGiftCards)
            {
                AvailableGiftCards.Add(new SelectListItem()
                {
                    Text  = giftCard.GiftCardName + " - " + decimal.Round(giftCard.RemainBalance) + " USD",
                    Value = giftCard.GiftCardId
                });
            }
        }
コード例 #19
0
 public CartService(
     IProductService productService,
     IOrderGroupFactory orderGroupFactory,
     IPlacedPriceProcessor placedPriceProcessor,
     IInventoryProcessor inventoryProcessor,
     ILineItemValidator lineItemValidator,
     IOrderRepository orderRepository,
     IPromotionEngine promotionEngine,
     IAddressBookService addressBookService,
     ICurrentMarket currentMarket,
     ICurrencyService currencyService,
     ReferenceConverter referenceConverter,
     IContentLoader contentLoader,
     IRelationRepository relationRepository,
     ShippingService shippingManagerFacade,
     IWarehouseRepository warehouseRepository,
     ILineItemCalculator lineItemCalculator,
     IPromotionService promotionService, IOrganizationService organizationService)
 {
     _productService        = productService;
     _orderGroupFactory     = orderGroupFactory;
     _customerContext       = CustomerContext.Current;
     _placedPriceProcessor  = placedPriceProcessor;
     _inventoryProcessor    = inventoryProcessor;
     _lineItemValidator     = lineItemValidator;
     _promotionEngine       = promotionEngine;
     _orderRepository       = orderRepository;
     _addressBookService    = addressBookService;
     _currentMarket         = currentMarket;
     _currencyService       = currencyService;
     _referenceConverter    = referenceConverter;
     _contentLoader         = contentLoader;
     _relationRepository    = relationRepository;
     _shippingManagerFacade = shippingManagerFacade;
     _warehouseRepository   = warehouseRepository;
     _lineItemCalculator    = lineItemCalculator;
     _promotionService      = promotionService;
     _organizationService   = organizationService;
 }
コード例 #20
0
        // ToDo: (Exewrcise C6)
        public ShirtVariationController(
            IContentLoader contentLoader
            , UrlResolver urlResolver
            , AssetUrlResolver assetUrlResolver
            , ThumbnailUrlResolver thumbnailUrlResolver // use this in node listing instead
            , IOrderRepository orderRepository
            , IOrderGroupFactory orderFactory
            , ILineItemValidator lineItemValidator
            // add for promo-price
            , IPromotionEngine promotionEngine
            , ICurrentMarket currentMarket
            )
            : base(contentLoader, urlResolver, assetUrlResolver, thumbnailUrlResolver)
        {
            _orderRepository   = orderRepository;   // AddToCart & AddToWishList
            _orderFactory      = orderFactory;      // AddToCart
            _lineItemValidator = lineItemValidator; // AddToCart

            // added for promos
            _promotionEngine = promotionEngine;
            _currentMarket   = currentMarket;
        }
コード例 #21
0
 public CheckoutController(IContentRepository contentRepository,
                           IMailService mailService,
                           LocalizationService localizationService,
                           ICurrencyService currencyService,
                           ControllerExceptionHandler controllerExceptionHandler,
                           CustomerContextFacade customerContextFacade,
                           IOrderRepository orderRepository,
                           CheckoutViewModelFactory checkoutViewModelFactory,
                           IOrderGroupCalculator orderGroupCalculator,
                           IPaymentProcessor paymentProcessor,
                           IPromotionEngine promotionEngine,
                           ICartService cartService,
                           IAddressBookService addressBookService,
                           OrderSummaryViewModelFactory orderSummaryViewModelFactory,
                           IOrderGroupFactory orderGroupFactory,
                           ICartServiceB2B cartServiceB2B,
                           IContentLoader contentLoader,
                           IOrganizationService organizationService)
 {
     _contentRepository            = contentRepository;
     _mailService                  = mailService;
     _localizationService          = localizationService;
     _currencyService              = currencyService;
     _controllerExceptionHandler   = controllerExceptionHandler;
     _customerContext              = customerContextFacade;
     _orderRepository              = orderRepository;
     _checkoutViewModelFactory     = checkoutViewModelFactory;
     _orderGroupCalculator         = orderGroupCalculator;
     _paymentProcessor             = paymentProcessor;
     _promotionEngine              = promotionEngine;
     _cartService                  = cartService;
     _addressBookService           = addressBookService;
     _orderSummaryViewModelFactory = orderSummaryViewModelFactory;
     _orderGroupFactory            = orderGroupFactory;
     _cartServiceB2B               = cartServiceB2B;
     _contentLoader                = contentLoader;
     _organizationService          = organizationService;
 }
コード例 #22
0
        protected PaymentOptionBase(LocalizationService localizationService,
                                    IOrderGroupFactory orderGroupFactory,
                                    ICurrentMarket currentMarket,
                                    LanguageService languageService,
                                    IPaymentService paymentService)
        {
            LocalizationService = localizationService;
            OrderGroupFactory   = orderGroupFactory;

            if (!string.IsNullOrEmpty(SystemKeyword))
            {
                var currentMarketId         = currentMarket.GetCurrentMarket().MarketId.Value;
                var currentLanguage         = languageService.GetCurrentLanguage().TwoLetterISOLanguageName;
                var availablePaymentMethods = paymentService.GetPaymentMethodsByMarketIdAndLanguageCode(currentMarketId, currentLanguage);
                var paymentMethod           = availablePaymentMethods.FirstOrDefault(m => m.SystemKeyword.Equals(SystemKeyword));

                if (paymentMethod != null)
                {
                    PaymentMethodId = paymentMethod.PaymentMethodId;
                    Name            = paymentMethod.FriendlyName;
                    Description     = paymentMethod.Description;
                }
            }
        }
コード例 #23
0
 public CheckOutController(IContentLoader contentLoader,
                           ICurrentMarket currentMarket,
                           IOrderRepository orderRepository,
                           IPlacedPriceProcessor placedPriceProcessor,
                           IInventoryProcessor inventoryProcessor,
                           ILineItemValidator lineItemValidator,
                           IOrderGroupCalculator orderGroupCalculator,
                           ILineItemCalculator lineItemCalculator,
                           IOrderGroupFactory orderGroupFactory,
                           IPaymentProcessor paymentProcessor,
                           IPromotionEngine promotionEngine)
 {
     _contentLoader        = contentLoader;
     _currentMarket        = currentMarket;
     _orderRepository      = orderRepository;
     _orderGroupCalculator = orderGroupCalculator;
     _orderGroupFactory    = orderGroupFactory;
     _paymentProcessor     = paymentProcessor;
     _promotionEngine      = promotionEngine;
     _lineItemCalculator   = lineItemCalculator;
     _inventoryProcessor   = inventoryProcessor;
     _lineItemValidator    = lineItemValidator;
     _placedPriceProcessor = placedPriceProcessor;
 }
コード例 #24
0
 public ShirtVariationController(
     IContentLoader contentLoader,
     UrlResolver urlResolver,
     AssetUrlResolver assetUrlResolver,
     ThumbnailUrlResolver thumbnailUrlResolver,
     IOrderRepository orderRepository,
     IOrderGroupFactory orderFactory,
     ILineItemValidator lineItemValidator,
     ICurrentMarket currentMarket,
     IInventoryService invService,
     IWarehouseRepository whRep,
     IPlacedPriceProcessor placedPriceProcessor,
     IPromotionEngine promotionEngine)
     : base(contentLoader, urlResolver, assetUrlResolver, thumbnailUrlResolver)
 {
     _orderRepository      = orderRepository;
     _orderFactory         = orderFactory;
     _lineItemValidator    = lineItemValidator;
     _currentMarket        = currentMarket;
     _invService           = invService;
     _whRep                = whRep;
     _placedPriceProcessor = placedPriceProcessor;
     _promotionEngine      = promotionEngine;
 }
 public GenericCreditCardPaymentMethod(LocalizationService localizationService, IOrderGroupFactory orderGroupFactory)
     : base(localizationService)
 {
     _orderGroupFactory     = orderGroupFactory;
     ExpirationMonth        = DateTime.Now.Month;
     CreditCardSecurityCode = "212";
     CardType         = "Generic";
     CreditCardNumber = "4662519843660534";
 }
 public GenericCreditCardPaymentMethod(IOrderGroupFactory orderGroupFactory)
     : this(LocalizationService.Current, orderGroupFactory)
 {
 }
コード例 #27
0
 public AddressBookService(IOrderGroupFactory orderGroupFactory,
                           ICustomerService customerService)
 {
     _customerService   = customerService;
     _orderGroupFactory = orderGroupFactory;
 }
コード例 #28
0
 public NetaxeptPaymentMethod(LocalizationService localizationService, IOrderGroupFactory orderGroupFactory)
     : base(localizationService, orderGroupFactory)
 {
 }
コード例 #29
0
 public OrderRepositoryBenchmarks(IOrderRepository orderRepository, IOrderGroupFactory orderGroupFactory, ILineItemValidator lineItemValidator, IPlacedPriceProcessor placedPriceProcessor, IInventoryProcessor inventoryProcessor, IPromotionEngine promotionEngine, IOrderGroupCalculator orderGroupCalculator, IPaymentProcessor paymentProcessor)
     : base(orderRepository, orderGroupFactory, lineItemValidator, placedPriceProcessor, inventoryProcessor, promotionEngine, orderGroupCalculator, paymentProcessor)
 {
 }
コード例 #30
0
 protected PaymentMethodBase(LocalizationService localizationService, IOrderGroupFactory orderGroupFactory)
 {
     _localizationService = localizationService;
     _orderGroupFactory   = orderGroupFactory;
 }