Ejemplo n.º 1
0
 public PaymentController(IPaymentService paymentService, ICheapPaymentGatewayService cheapPaymentGatewayService, IExpensivePaymentGatewayService expensivePaymentGatewayService, IPremiumPaymentService premiumPaymentService)
 {
     this.paymentService                 = paymentService;
     this.cheapPaymentGatewayService     = cheapPaymentGatewayService;
     this.expensivePaymentGatewayService = expensivePaymentGatewayService;
     this.premiumPaymentService          = premiumPaymentService;
 }
Ejemplo n.º 2
0
 public PaymentManager(IPremiumPaymentService premiumPaymentService,
                       IExpensivePaymentService expensivePaymentService, ICheapPaymentService cheapPaymentService)
 {
     _premiumPaymentService   = premiumPaymentService;
     _expensivePaymentService = expensivePaymentService;
     _cheapPaymentService     = cheapPaymentService;
 }
Ejemplo n.º 3
0
 public PaymentGatewayService(ICheapPaymentGateway cheapPaymentManager, IExpensivePaymentGateway expensivePaymentManager, IPremiumPaymentService premiumPaymentManager, ILogger <PaymentGatewayService> logger)
 {
     _cheapPaymentManager     = cheapPaymentManager;
     _expensivePaymentManager = expensivePaymentManager;
     _premiumPaymentManager   = premiumPaymentManager;
     _logger = logger;
 }
 public PaymentController(IPaymentGateway paymentGateway, ICheapPaymentGateway cheapPaymentGateway, IExpensivePaymentGateway expensivePaymentGateway, IPremiumPaymentService premiumPaymentService)
 {
     _IPaymentGateway          = paymentGateway;
     _ICheapPaymentGateway     = cheapPaymentGateway;
     _IExpensivePaymentGateway = expensivePaymentGateway;
     _IPremiumPaymentService   = premiumPaymentService;
 }
 public PaymentProcessorLogic(ICheapPaymentGateway cheap, IExpensivePaymentGateway expensive, IPremiumPaymentService premium, IOptions <ExternalSettings> app)
 {
     _cheapPaymentGateway     = cheap;
     _expensivePaymentGateway = expensive;
     _premiumPaymentService   = premium;
     appSettings = app;
 }
Ejemplo n.º 6
0
 public ProcessController(IExpensivePaymentGateway expensivePaymentGateway,
                          IMapper mapper, ICheapPaymentGateway cheapPaymentGateway, IPremiumPaymentService premiumPaymentService)
 {
     _expensivePaymentGateway = expensivePaymentGateway;
     _mapper = mapper;
     _cheapPaymentGateway   = cheapPaymentGateway;
     _premiumPaymentService = premiumPaymentService;
 }
Ejemplo n.º 7
0
 public PaymentRepository(ApplicationContext context, ICheapPaymentGateway cheapPaymentGateway, IExpensivePaymentGateway expensivePayment
                          , IPremiumPaymentService premiumPaymentService
                          )
 {
     _applicationContext = context;
     _cheapPayment       = cheapPaymentGateway;
     _expensiveRepo      = expensivePayment;
     _premiumRepo        = premiumPaymentService;
 }
Ejemplo n.º 8
0
 public PaymentController(ILogger <PaymentController> logger,
                          ICheapPaymentGateway cheapPaymentGateway,
                          IExpensivePaymentGateway expensivePaymentGateway,
                          IPremiumPaymentService premiumPaymentService)
 {
     _logger = logger;
     _cheapPaymentGateway     = cheapPaymentGateway;
     _expensivePaymentGateway = expensivePaymentGateway;
     _premiumPaymentService   = premiumPaymentService;
 }
        public PostUnitTestController()
        {
            var context = new PaymentAccessPortalContext(dbContextOptions);

            _IPaymentGateway          = new PaymentServicesFake(context);
            _ICheapPaymentGateway     = new PaymentServicesFake(context);
            _IExpensivePaymentGateway = new PaymentServicesFake(context);
            _IPremiumPaymentService   = new PaymentServicesFake(context);
            _controller = new PaymentController(_IPaymentGateway, _ICheapPaymentGateway, _IExpensivePaymentGateway, _IPremiumPaymentService);
        }
Ejemplo n.º 10
0
 public PaymentService(IPaymentRepository paymentRepository, IMapper mapper, ICheapPaymentGateway cheapPaymentGateway,
                       IPremiumPaymentService premiumPaymentService,
                       IExpensivePaymentGateway expensivePaymentGateway
                       )
 {
     _cheapPaymentGateway     = cheapPaymentGateway;
     _paymentRepository       = paymentRepository;
     _premiumPaymentService   = premiumPaymentService;
     _expensivePaymentGateway = expensivePaymentGateway;
     _mapper = mapper;
 }
Ejemplo n.º 11
0
 public PaymentController(ILogger <PaymentController> logger, IMapper mapper,
                          ICheapPaymentGateway cheapPaymentGateway,
                          IExpensivePaymentGateway expensivePaymentGateway,
                          IPremiumPaymentService premiumPaymentService, IUnitOfWork unitOfWork)
 {
     _logger = logger;
     _cheapPaymentGateway     = cheapPaymentGateway;
     _expensivePaymentGateway = expensivePaymentGateway;
     _premiumPaymentService   = premiumPaymentService;
     _mapper     = mapper;
     _unitOfWork = unitOfWork;
 }
Ejemplo n.º 12
0
 public PaymentBusiness(ILogger <PaymentBusiness> logger,
                        ICheapPaymentGateway cheapPaymentGateway,
                        IExpensivePaymentGateway expensivePaymentGateway,
                        IPremiumPaymentService premiumPaymentService,
                        IPaymentServiceDA <Payment> paymentServiceDA)
 {
     _Iogger = logger;
     _CheapPaymentGateway     = cheapPaymentGateway;
     _ExpensivePaymentGateway = expensivePaymentGateway;
     _PremiumPaymentService   = premiumPaymentService;
     _PaymentServiceDA        = paymentServiceDA;
 }
Ejemplo n.º 13
0
 public PaymentProcessService(IRepositoryService <Payment> repositoryService
                              , IMapper mapper
                              , ICheapPaymentGateway cheapPaymentGateway
                              , IExpensivePaymentGateway expensivePaymentGateway
                              , IPremiumPaymentService premiumPaymentService
                              )
 {
     this.repositoryService       = repositoryService;
     this.mapper                  = mapper;
     this.cheapPaymentGateway     = cheapPaymentGateway;
     this.expensivePaymentGateway = expensivePaymentGateway;
     this.premiumPaymentService   = premiumPaymentService;
 }
Ejemplo n.º 14
0
 public ProcessPaymentController(
     ICheapPaymentGateway cheapPaymentGateway,
     IExpensivePaymentGateway expensivePaymentGateway,
     IPremiumPaymentService premiumPaymentService,
     IMapper mapper)
 {
     _mapper = mapper ??
               throw new ArgumentNullException(nameof(mapper));
     _expensivePaymentGateway = expensivePaymentGateway ??
                                throw new ArgumentNullException(nameof(expensivePaymentGateway));
     _cheapPaymentGateway = cheapPaymentGateway ??
                            throw new ArgumentNullException(nameof(cheapPaymentGateway));
     _premiumPaymentService = premiumPaymentService ??
                              throw new ArgumentNullException(nameof(premiumPaymentService));
 }
Ejemplo n.º 15
0
        public PaymentService(IPaymentStatusService paymentStatusService, IUnitOfWorkBase <PaymentContext> unitOfWork, ILogger <PaymentService> logger,
                              IExpensivePaymentGateway expensivePaymentGateway, ICheapPaymentGateway cheapPaymentGateway, IPremiumPaymentService premiumPaymentService)
        {
            PaymentStatusService = paymentStatusService;

            UnitOfWork = unitOfWork ?? throw new ArgumentNullException(nameof(unitOfWork));

            if (PaymentRepo == null)
            {
                PaymentRepo = UnitOfWork.GetRepository <Payment>();
            }

            ExpensivePaymentGateway = expensivePaymentGateway;
            CheapPaymentGateway     = cheapPaymentGateway;
            PremiumPaymentService   = premiumPaymentService;

            Logger = logger ?? throw new ArgumentNullException(nameof(logger));
        }
Ejemplo n.º 16
0
 public PaymentGatewayFactory(ICheapPaymentGateway cheapGateway, IExpensivePaymentGateway expensiveGateway, IPremiumPaymentService premiumGateway)
 {
     _cheapGateway     = cheapGateway;
     _expensiveGateway = expensiveGateway;
     _premiumGateway   = premiumGateway;
 }