예제 #1
0
 public PaymentService(IUserService userService, IPaymentHistoryRepository paymentHistoryRepository)
 {
     _apiContext  = GetContext();
     _userService = userService;
     _paymentHistoryRepository = paymentHistoryRepository;
     _config = ConfigManager.Instance.GetProperties();
 }
예제 #2
0
        public async Task SetUp()
        {
            var configuration = new ConfigurationBuilder()
                                .SetBasePath(Directory.GetCurrentDirectory())
                                .AddJsonFile("appsettings.json")
                                .Build();

            var services = new ServiceCollection();

            services.AddTransient <IReflinkHelper, ReflinkHelper>();
            services.AddTransient <IUserAccountDataHelper, UserAccountDataHelper>();
            services.AddTransient <IMatrixPositionHelper, MatrixPositionHelper>();
            services.AddTransient <IUserMultiAccountHelper, UserMultiAccountHelper>();
            services.AddTransient <IPaymentHistoryHelper, PaymentHistoryHelper>();
            services.AddTransient <IUserAccountDataRepository, UserAccountDataRepository>();
            services.AddTransient <IUserMultiAccountRepository, UserMultiAccountRepository>();
            services.AddTransient <IMatrixPositionRepository, MatrixPositionRepository>();
            services.AddTransient <IPaymentHistoryRepository, PaymentHistoryRepository>();
            services.AddTransient <IArticleRepository, ArticleRepository>();
            services.AddTransient <ITicketRepository, TicketRepository>();
            services.AddTransient <IWithdrawalRepository, WithdrawalRepository>();
            services.Configure <JwtSettings>(configuration.GetSection("JwtSettings"));

            services.AddAutoMapper();
            services.AddMediatR(typeof(RegisterNewUserAccountCommand).Assembly);

            var connectionString = $@"Server=XARDASLORD\SQLEXPRESS;Database=BitClub7_integration_tests_{Guid.NewGuid()};Integrated Security=SSPI";

            services.AddDbContext <IBitClub7Context, BitClub7Context>(
                opts => opts.UseSqlServer(connectionString,
                                          b => b.MigrationsAssembly(typeof(IBitClub7Context).Namespace))
                );

            var serviceProvider = services.AddEntityFrameworkSqlServer()
                                  .BuildServiceProvider();

            _context                    = serviceProvider.GetRequiredService <IBitClub7Context>();
            _mapper                     = serviceProvider.GetRequiredService <IMapper>();
            _mediator                   = serviceProvider.GetRequiredService <IMediator>();
            _reflinkHelper              = serviceProvider.GetRequiredService <IReflinkHelper>();
            _userAccountDataHelper      = serviceProvider.GetRequiredService <IUserAccountDataHelper>();
            _matrixPositionHelper       = serviceProvider.GetRequiredService <IMatrixPositionHelper>();
            _userMultiAccountHelper     = serviceProvider.GetRequiredService <IUserMultiAccountHelper>();
            _paymentHistoryHelper       = serviceProvider.GetRequiredService <IPaymentHistoryHelper>();
            _userAccountDataRepository  = serviceProvider.GetRequiredService <IUserAccountDataRepository>();
            _userMultiAccountRepository = serviceProvider.GetRequiredService <IUserMultiAccountRepository>();
            _matrixPositionRepository   = serviceProvider.GetRequiredService <IMatrixPositionRepository>();
            _paymentHistoryRepository   = serviceProvider.GetRequiredService <IPaymentHistoryRepository>();
            _articleRepository          = serviceProvider.GetRequiredService <IArticleRepository>();
            _ticketRepository           = serviceProvider.GetRequiredService <ITicketRepository>();
            _withdrawalRepository       = serviceProvider.GetRequiredService <IWithdrawalRepository>();
            _jwtSettings                = serviceProvider.GetRequiredService <IOptions <JwtSettings> >();
            _bitBayPayApiSettings       = serviceProvider.GetRequiredService <IOptions <BitBayPayApiSettings> >();
            _matrixStructureSettings    = serviceProvider.GetRequiredService <IOptions <MatrixStructureSettings> >();
            _storageSettings            = serviceProvider.GetRequiredService <IOptions <StorageSettings> >();

            _context.Database.Migrate();
            await ClearDatabase();
        }
 public GetPaymentHistoriesRequestHandler(
     IPaymentHistoryRepository paymentHistoryRepository,
     IUserAccountDataRepository userAccountDataRepository,
     IMapper mapper)
 {
     _paymentHistoryRepository  = paymentHistoryRepository;
     _userAccountDataRepository = userAccountDataRepository;
     _mapper = mapper;
 }
예제 #4
0
 public PaymentStatusChangedEventJob(
     IPaymentHistoryRepository paymentHistoryRepository,
     IUserAccountDataRepository userAccountDataRepository,
     IBackgroundJobClient backgroundJobClient)
 {
     _userAccountDataRepository = userAccountDataRepository;
     _backgroundJobClient       = backgroundJobClient;
     _paymentHistoryRepository  = paymentHistoryRepository;
 }
 public CreatePaymentCommandHandler(IAcquiringBankService acquiringBankService,
                                    IPaymentHistoryRepository paymentHistoryRepository, IMetrics metrics,
                                    ILogger <CreatePaymentCommandHandler> logger, IEventStoreClient eventStoreClient)
 {
     _acquiringBankService     = acquiringBankService;
     _paymentHistoryRepository = paymentHistoryRepository;
     _metrics          = metrics;
     _logger           = logger;
     _eventStoreClient = eventStoreClient;
 }
예제 #6
0
 protected EarningEventProcessorBase(
     IMapper mapper,
     IRequiredPaymentProcessor requiredPaymentProcessor,
     IHoldingBackCompletionPaymentService completionPaymentService,
     IPaymentHistoryRepository paymentHistoryRepository,
     IApprenticeshipKeyProvider apprenticeshipKeyProvider,
     INegativeEarningService negativeEarningService,
     IPaymentLogger paymentLogger)
 {
     this.mapper = mapper ?? throw new ArgumentNullException(nameof(mapper));
     this.requiredPaymentProcessor  = requiredPaymentProcessor ?? throw new ArgumentNullException(nameof(requiredPaymentProcessor));
     this.completionPaymentService  = completionPaymentService;
     this.paymentHistoryRepository  = paymentHistoryRepository;
     this.apprenticeshipKeyProvider = apprenticeshipKeyProvider;
     this.negativeEarningService    = negativeEarningService;
     this.paymentLogger             = paymentLogger;
 }
예제 #7
0
 public ApprenticeshipAct1RedundancyEarningsEventProcessor(
     IMapper mapper,
     IRequiredPaymentProcessor requiredPaymentProcessor,
     IHoldingBackCompletionPaymentService holdingBackCompletionPaymentService,
     IPaymentHistoryRepository paymentHistoryRepository,
     IApprenticeshipKeyProvider apprenticeshipKeyProvider,
     INegativeEarningService negativeEarningService,
     IPaymentLogger paymentLogger, IDuplicateEarningEventService duplicateEarningEventService
     ) : base(
         mapper,
         requiredPaymentProcessor,
         holdingBackCompletionPaymentService,
         paymentHistoryRepository,
         apprenticeshipKeyProvider,
         negativeEarningService,
         paymentLogger, duplicateEarningEventService
         )
 {
 }
 public ApprenticeshipContractType2EarningEventProcessor(
     IMapper mapper,
     IRequiredPaymentProcessor requiredPaymentProcessor,
     IHoldingBackCompletionPaymentService holdingBackCompletionPaymentService,
     IPaymentHistoryRepository paymentHistoryRepository,
     IApprenticeshipKeyProvider apprenticeshipKeyProvider,
     INegativeEarningService negativeEarningService,
     IPaymentLogger paymentLogger
     ) : base(
         mapper,
         requiredPaymentProcessor,
         holdingBackCompletionPaymentService,
         paymentHistoryRepository,
         apprenticeshipKeyProvider,
         negativeEarningService,
         paymentLogger
         )
 {
 }
 public FunctionalSkillEarningsEventProcessor(
     IMapper mapper,
     IRequiredPaymentProcessor requiredPaymentProcessor,
     IHoldingBackCompletionPaymentService holdingBackCompletionPaymentService,
     IPaymentHistoryRepository paymentHistoryRepository,
     IApprenticeshipKeyProvider apprenticeshipKeyProvider,
     INegativeEarningService negativeEarningService,
     IPaymentLogger paymentLogger,
     IDuplicateEarningEventService duplicateEarningEventService,
     ITelemetry telemetry
     ) : base(
         mapper,
         requiredPaymentProcessor,
         holdingBackCompletionPaymentService,
         paymentHistoryRepository,
         apprenticeshipKeyProvider,
         negativeEarningService,
         paymentLogger,
         duplicateEarningEventService,
         telemetry)
 {
 }
예제 #10
0
 public PayMembershipsFeeCommandHandler(IBitBayPayFacade bitBayPayFacade, IUserAccountDataRepository userAccountDataRepository, IPaymentHistoryRepository paymentHistoryRepository)
 {
     _bitBayPayFacade           = bitBayPayFacade;
     _userAccountDataRepository = userAccountDataRepository;
     _paymentHistoryRepository  = paymentHistoryRepository;
 }
예제 #11
0
 public PaymentHistoryHelper(IPaymentHistoryRepository paymentHistoryRepository)
 {
     _paymentHistoryRepository = paymentHistoryRepository;
 }
 public PaymentHistoryController(IPaymentHistoryRepository paymentHistoryRepository)
 {
     _paymentHistoryRepository = paymentHistoryRepository;
 }
예제 #13
0
 public PaymentHistoryHandler(IPaymentHistoryRepository paymentHistoryRepository, IMapper mapper)
 {
     this.paymentHistoryRepository = paymentHistoryRepository ?? throw new ArgumentNullException(nameof(paymentHistoryRepository));
     this.mapper = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
예제 #14
0
 public GetPaymentByIdQueryHandler(IPaymentHistoryRepository paymentHistoryRepository, IMetrics metrics)
 {
     _paymentHistoryRepository = paymentHistoryRepository;
     _metrics = metrics;
 }
 public PaymentHistoryService(IPaymentHistoryRepository historyRepository)
 {
     _historyRepository = historyRepository;
 }
 public DonateViaAffiliateProgramCommandHandler(IUserMultiAccountRepository userMultiAccountRepository, IPaymentHistoryRepository paymentHistoryRepository, IBitBayPayFacade bitBayPayFacade)
 {
     _userMultiAccountRepository = userMultiAccountRepository;
     _paymentHistoryRepository   = paymentHistoryRepository;
     _bitBayPayFacade            = bitBayPayFacade;
 }
 public PayMatrixLevelCommandHandler(IBitBayPayFacade bitBayPayFacade, IUserMultiAccountRepository userAccountDataRepository, IPaymentHistoryRepository paymentHistoryRepository)
 {
     _bitBayPayFacade           = bitBayPayFacade;
     _userAccountDataRepository = userAccountDataRepository;
     _paymentHistoryRepository  = paymentHistoryRepository;
 }
예제 #18
0
 public PaymentHistoryService(IUnitOfWork unitOfWork, IPaymentHistoryRepository paymentHistoryRepository)
 {
     _unitOfWork = unitOfWork;
     _paymentHistoryRepository = paymentHistoryRepository;
 }
 public RemovedLearnerAimIdentificationService(IPaymentHistoryRepository paymentHistoryRepository)
 {
     this.paymentHistoryRepository = paymentHistoryRepository;
 }