コード例 #1
0
 public PaymentProcessor(IPaymentsRepository paymentsRepository, IAcquiringBank acquiringBank,
                         ILogger <PaymentProcessor> logger, IPaymentsService paymentsService)
 {
     _paymentsRepository = paymentsRepository;
     _acquiringBank      = acquiringBank;
     _logger             = logger;
     _paymentsService    = paymentsService;
 }
コード例 #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);
        }
コード例 #3
0
 public RequestPaymentCommandHandler(ILogger <RequestPaymentCommandHandler> logger,
                                     IMerchantRepository merchantRepository,
                                     IPaymentRepository paymentRequestRepository,
                                     IAcquiringBank acquiringBank)
 {
     _logger                   = logger;
     _merchantRepository       = merchantRepository;
     _paymentRequestRepository = paymentRequestRepository;
     _acquiringBank            = acquiringBank;
 }
コード例 #4
0
 public PaymentProcessor(IAggregateRepository <Payment, PaymentId> paymentRepository,
                         IPaymentService paymentService,
                         IAcquiringBank bank,
                         IProvideDateTime dateProvider)
 {
     _paymentRepository = paymentRepository;
     _paymentService    = paymentService;
     _bank         = bank;
     _dateProvider = dateProvider;
 }
コード例 #5
0
 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);
 }
コード例 #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;
 }
コード例 #7
0
        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);
        }
コード例 #8
0
 public PaymentService(IPaymentRepository paymentRepository, IAcquiringBank acquiringBank, IPaymentRequestDuplicateChecker paymentRequestDuplicateChecker)
 {
     _paymentRepository = paymentRepository;
     _paymentRequestDuplicateChecker = paymentRequestDuplicateChecker;
     _acquiringBank = acquiringBank;
 }
コード例 #9
0
 public PaymentService(IMongoCollection <PaymentModel> paymentModelCollection, IAcquiringBank acquiringBank, ILoggerService logger)
 {
     _acquiringBank          = acquiringBank;
     _paymentModelCollection = paymentModelCollection;
     _logger = logger;
 }
コード例 #10
0
 public NewPaymentEndpoint(IAcquiringBank acquiringBank, IEventStore eventStore)
 {
     this.acquiringBank = acquiringBank;
     this.eventStore    = eventStore;
 }
コード例 #11
0
 public PaymentRequestProcessor(IAcquiringBank acquiringBank, IMediator mediator)
 {
     this.acquiringBank = acquiringBank;
     this.mediator      = mediator;
 }
コード例 #12
0
 public PaymentController(IAcquiringBank acquiringBank, IPaymentStorage paymentStorage, IPaymentRequestValidator paymentRequestValidator)
 {
     this.acquiringBank           = acquiringBank;
     this.paymentStorage          = paymentStorage;
     this.paymentRequestValidator = paymentRequestValidator;
 }
コード例 #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));
 }
コード例 #14
0
 public PaymentGatewayController(ILogger <PaymentGatewayController> logger, IAcquiringBank acquiringBank)
 {
     _logger        = logger;
     _acquiringBank = acquiringBank;
 }
コード例 #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;
 }
コード例 #16
0
 public PaymentProcessHandler(IAcquiringBank bank, IRepository repository)
 {
     this.bank       = bank;
     this.repository = repository;
 }