Exemplo n.º 1
0
 public PaymentProcessor(IPaymentsRepository paymentsRepository, IAcquiringBank acquiringBank,
                         ILogger <PaymentProcessor> logger, IPaymentsService paymentsService)
 {
     _paymentsRepository = paymentsRepository;
     _acquiringBank      = acquiringBank;
     _logger             = logger;
     _paymentsService    = paymentsService;
 }
Exemplo n.º 2
0
        public RequestPaymentCommandHandlerTests()
        {
            _merchantRepository = Substitute.For <IMerchantRepository>();
            _paymentrepository  = Substitute.For <IPaymentRepository>();
            _acquiringBank      = Substitute.For <IAcquiringBank>();
            _logger             = Substitute.For <ILogger <RequestPaymentCommandHandler> >();

            _handler = new RequestPaymentCommandHandler(_logger, _merchantRepository, _paymentrepository, _acquiringBank);
        }
Exemplo n.º 3
0
 public RequestPaymentCommandHandler(ILogger <RequestPaymentCommandHandler> logger,
                                     IMerchantRepository merchantRepository,
                                     IPaymentRepository paymentRequestRepository,
                                     IAcquiringBank acquiringBank)
 {
     _logger                   = logger;
     _merchantRepository       = merchantRepository;
     _paymentRequestRepository = paymentRequestRepository;
     _acquiringBank            = acquiringBank;
 }
 public PaymentProcessor(IAggregateRepository <Payment, PaymentId> paymentRepository,
                         IPaymentService paymentService,
                         IAcquiringBank bank,
                         IProvideDateTime dateProvider)
 {
     _paymentRepository = paymentRepository;
     _paymentService    = paymentService;
     _bank         = bank;
     _dateProvider = dateProvider;
 }
 public Arrangements(IAcquiringBank bank,
                     IServiceProvider serviceProvider,
                     IPublishEndpoint publishEndpoint,
                     ConsumeContext <ProcessPayment> consumeContext,
                     List <IEvent> firedEvents)
 {
     this.bank       = bank;
     ConsumeContext  = consumeContext;
     PublishEndpoint = publishEndpoint;
     FiredEvents     = firedEvents;
     SUT             = new ProcessPaymentHandler(serviceProvider);
 }
Exemplo n.º 6
0
 public ProcessPaymentHandler(
     IAcquiringBank acquiringBank,
     INowProvider nowProvider,
     IMemoryCache cache,
     ILogger logger,
     CachingOptions cachingOptions,
     CheckoutPaymentAPIContext context)
 {
     _acquiringBank  = acquiringBank;
     _nowProvider    = nowProvider;
     _cache          = cache;
     _logger         = logger;
     _cachingOptions = cachingOptions;
     _context        = context;
 }
        public PaymentProcessorTests()
        {
            var today        = new DateTimeOffset(new DateTime(2019, 08, 19, 0, 0, 0, DateTimeKind.Utc));
            var dateProvider = Substitute.For <IProvideDateTime>();

            dateProvider.UtcNow().Returns(today);

            var payment = PaymentFactory.Create(dateProvider);

            _paymentId = payment.Id;

            _paymentService = Substitute.For <IPaymentService>();
            _bank           = Substitute.For <IAcquiringBank>();
            _paymentRepo    = Substitute.For <IAggregateRepository <Payment, PaymentId> >();
            _paymentRepo.Get(Arg.Is(_paymentId)).Returns(payment);
        }
Exemplo n.º 8
0
 public PaymentService(IPaymentRepository paymentRepository, IAcquiringBank acquiringBank, IPaymentRequestDuplicateChecker paymentRequestDuplicateChecker)
 {
     _paymentRepository = paymentRepository;
     _paymentRequestDuplicateChecker = paymentRequestDuplicateChecker;
     _acquiringBank = acquiringBank;
 }
Exemplo n.º 9
0
 public PaymentService(IMongoCollection <PaymentModel> paymentModelCollection, IAcquiringBank acquiringBank, ILoggerService logger)
 {
     _acquiringBank          = acquiringBank;
     _paymentModelCollection = paymentModelCollection;
     _logger = logger;
 }
Exemplo n.º 10
0
 public NewPaymentEndpoint(IAcquiringBank acquiringBank, IEventStore eventStore)
 {
     this.acquiringBank = acquiringBank;
     this.eventStore    = eventStore;
 }
Exemplo n.º 11
0
 public PaymentRequestProcessor(IAcquiringBank acquiringBank, IMediator mediator)
 {
     this.acquiringBank = acquiringBank;
     this.mediator      = mediator;
 }
Exemplo n.º 12
0
 public PaymentController(IAcquiringBank acquiringBank, IPaymentStorage paymentStorage, IPaymentRequestValidator paymentRequestValidator)
 {
     this.acquiringBank           = acquiringBank;
     this.paymentStorage          = paymentStorage;
     this.paymentRequestValidator = paymentRequestValidator;
 }
Exemplo n.º 13
0
 public ChargesController(PaymentGatewayContext db, IAcquiringBank bank, ILogger <ChargesController> logger)
 {
     _db     = db ?? throw new ArgumentNullException(nameof(db));
     _bank   = bank ?? throw new ArgumentNullException(nameof(bank));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 public PaymentGatewayController(ILogger <PaymentGatewayController> logger, IAcquiringBank acquiringBank)
 {
     _logger        = logger;
     _acquiringBank = acquiringBank;
 }
Exemplo n.º 15
0
 /// <summary>
 /// Creates a new instance of the payment helper class.
 /// </summary>
 /// <param name="logger">Logger</param>
 /// <param name="bank">Acquiring bank helper class</param>
 /// <param name="dataAccess">Data access helper class</param>
 public PaymentHelper(ILogger <IPaymentHelper> logger, IAcquiringBank bank, IDataAccess dataAccess)
 {
     Logger     = logger;
     Bank       = bank;
     DataAccess = dataAccess;
 }
Exemplo n.º 16
0
 public PaymentProcessHandler(IAcquiringBank bank, IRepository repository)
 {
     this.bank       = bank;
     this.repository = repository;
 }