예제 #1
0
 public DsrController(ILocationService locationService, IErrorLogService _errorLogService, IDsrService DsrService, IKycService kycService)
 {
     this._DsrService      = DsrService;
     this._kycService      = kycService;
     this.errorLogService  = _errorLogService;
     this._locationService = locationService;
 }
예제 #2
0
 public MerchantController(IErrorLogService _errorLogService, IMerchantService MerchantService, IKycService kycService, IMerchantUserService merchantUserService)
 {
     this._MerchantService     = MerchantService;
     this._kycService          = kycService;
     this._MerchantUserService = merchantUserService;
     this.errorLogService      = _errorLogService;
 }
예제 #3
0
 public TransactionService(
     ILog log,
     IIcoExRateClient exRateClient, 
     IInvestorAttributeRepository investorAttributeRepository, 
     ICampaignInfoRepository campaignInfoRepository,
     ICampaignSettingsRepository campaignSettingsRepository,
     IInvestorTransactionRepository investorTransactionRepository,
     IInvestorRefundRepository investorRefundRepository,
     IInvestorRepository investorRepository,
     IQueuePublisher<InvestorNewTransactionMessage> investmentMailSender,
     IKycService kycService,
     IReferralCodeService referralCodeService,
     string siteSummaryPageUrl)
 {
     _log = log;
     _exRateClient = exRateClient;
     _investorAttributeRepository = investorAttributeRepository;
     _campaignInfoRepository = campaignInfoRepository;
     _campaignSettingsRepository = campaignSettingsRepository;
     _investorTransactionRepository = investorTransactionRepository;
     _investorRefundRepository = investorRefundRepository;
     _investorRepository = investorRepository;
     _investmentMailSender = investmentMailSender;
     _kycService = kycService;
     _referralCodeService = referralCodeService;
     _siteSummaryPageUrl = siteSummaryPageUrl;
 }
 public TransactionMasterController(IKycService _kycService, ITransactionMasterService _transMastService, IErrorLogService objerrorLogService,
                                    IAuditTrailService objAuditTrailService)
 {
     this.transMastService = _transMastService;
     this.errorLogService  = objerrorLogService;
     _auditTrailService    = objAuditTrailService;
     this.kycService       = _kycService;
 }
예제 #5
0
 public CustomerRequestController(IKycService _kycService, IErrorLogService _errorLogService, IAuditTrailService _auditTrailService, ICustomerReqLogService _customerReqLogService, ICustomerRequestService _customerRequestService)
 {
     auditTrailService      = _auditTrailService;
     customerReqLogService  = _customerReqLogService;
     customerRequestService = _customerRequestService;
     errorLogService        = _errorLogService;
     kycService             = _kycService;
 }
예제 #6
0
 public AgentController(IAgentService service, IDsrService dsrService, IKycService kycService
                        , IErrorLogService _errorLogService, IAuditTrailService objAuditTrailService)
 {
     this._service        = service;
     this._dsrService     = dsrService;
     this._kycService     = kycService;
     this.errorLogService = _errorLogService;
     _auditTrailService   = objAuditTrailService;
 }
예제 #7
0
 public DistributorController(ICustomerRequestService _customerRequestService, IErrorLogService _errorLogService, IAuditTrailService _auditTrailService, ILocationService locationService, IKycService kycService, IDistributorService distributorService, IDsrService objDsrService, IDormantAccService _dormantAccService)
 {
     this.auditTrailService      = _auditTrailService;
     this._distributorService    = distributorService;
     this._DsrService            = objDsrService;
     this.dormantAccService      = _dormantAccService;
     this._kycService            = kycService;
     this._locationService       = locationService;
     this.errorLogService        = _errorLogService;
     this.customerRequestService = _customerRequestService;
 }
 public PartnerCreatedSubscriber(
     IKycService kycService,
     string connectionString,
     string exchangeName,
     string queueName,
     ILogFactory logFactory)
     : base(connectionString, exchangeName, queueName, logFactory)
 {
     _kycService = kycService;
     _log        = logFactory.CreateLog(this);
 }
예제 #9
0
 public KycController(IKycService _service, IReportShareService shareService)
 {
     this.service            = _service;
     this.reportShareService = shareService;
 }
예제 #10
0
 public KycController(IKycService _kycService, IErrorLogService _errorLogService)
 {
     this.kycService      = _kycService;
     this.errorLogService = _errorLogService;
 }
예제 #11
0
 public OutboxController(IErrorLogService _errorLogService, IOutboxService _outboxService, IKycService _kycService)
 {
     outboxService   = _outboxService;
     errorLogService = _errorLogService;
     kycService      = _kycService;
 }
예제 #12
0
 public KycController(IKycService kycService, IMapper mapper)
 {
     _kycService = Guard.IsNotNull(kycService, nameof(kycService));
     _mapper     = Guard.IsNotNull(mapper, nameof(mapper));
 }
예제 #13
0
 public EnterpriseService(IEnterpriseRepository enterpriseRepository, IKycService _kycService)
 {
     this.enterpriseRepository = enterpriseRepository;
     this.kycService           = _kycService;
 }
예제 #14
0
 public MerchantService(IMerchantRepository MerchantRepository, IMerchantConfigService merchantConfigService, IKycService kycService)
 {
     this._MerchantRepository    = MerchantRepository;
     this._merchantConfigService = merchantConfigService;
     this._kycService            = kycService;
 }
        private TransactionService Init(string investorEmail = "*****@*****.**", double exchangeRate = 1.0)
        {
            _log = new LogToMemory();

            _campaignInfoRepository = new Mock <ICampaignInfoRepository>();

            _campaignInfoRepository
            .Setup(m => m.IncrementValue(It.Is <CampaignInfoType>(t => t == CampaignInfoType.AmountInvestedUsd), It.IsAny <decimal>()))
            .Callback((CampaignInfoType t, decimal v) => _usdAmount += v)
            .Returns(() => Task.CompletedTask);

            _campaignInfoRepository
            .Setup(m => m.SaveLatestTransactionsAsync(It.IsAny <string>(), It.IsAny <string>()))
            .Returns(() => Task.CompletedTask);

            _campaignSettings = new CampaignSettings
            {
                PreSaleStartDateTimeUtc    = DateTime.UtcNow.AddDays(-15),
                PreSaleEndDateTimeUtc      = DateTime.UtcNow,
                PreSaleTotalTokensAmount   = 100000000,
                CrowdSaleStartDateTimeUtc  = DateTime.UtcNow,
                CrowdSaleEndDateTimeUtc    = DateTime.UtcNow.AddDays(21),
                CrowdSaleTotalTokensAmount = 360000000,
                TokenDecimals         = 4,
                MinInvestAmountUsd    = 1000,
                TokenBasePriceUsd     = 0.064M,
                HardCapUsd            = 1000000,
                EnableReferralProgram = true,
                ReferralCodeLength    = 6
            };

            _campaignSettingsRepository = new Mock <ICampaignSettingsRepository>();

            _campaignSettingsRepository
            .Setup(m => m.GetAsync())
            .Returns(() => Task.FromResult(_campaignSettings));

            _exRateClient = new Mock <IIcoExRateClient>();

            _exRateClient
            .Setup(m => m.GetAverageRate(It.IsAny <Pair>(), It.IsAny <DateTime>()))
            .Returns(() => Task.FromResult(new AverageRateResponse {
                AverageRate = exchangeRate
            }));

            _investor = new Investor()
            {
                Email             = investorEmail,
                ConfirmationToken = Guid.NewGuid(),
                AmountUsd         = _campaignSettings.MinInvestAmountUsd + 10
            };

            _investorRepository = new Mock <IInvestorRepository>();

            _investorRepository
            .Setup(m => m.GetAsync(It.Is <string>(v => !string.IsNullOrWhiteSpace(v) && v == investorEmail)))
            .Returns(() => Task.FromResult(_investor));

            _investorRepository
            .Setup(m => m.SaveReferralCode(It.IsAny <string>(), It.IsAny <string>()))
            .Returns(() => Task.CompletedTask);

            _investorAttributeRepository = new Mock <IInvestorAttributeRepository>();

            _investorAttributeRepository
            .Setup(m => m.SaveAsync(It.IsAny <InvestorAttributeType>(), It.IsAny <string>(), It.IsAny <string>()))
            .Returns(() => Task.CompletedTask);

            _investorAttributeRepository
            .Setup(m => m.GetInvestorEmailAsync(
                       It.IsIn(new InvestorAttributeType[] { InvestorAttributeType.PayInBtcAddress, InvestorAttributeType.PayInEthAddress }),
                       It.IsAny <string>()))
            .Returns(() => Task.FromResult(investorEmail));

            _investorAttributeRepository
            .Setup(m => m.GetInvestorEmailAsync(
                       It.IsIn(new InvestorAttributeType[] { InvestorAttributeType.ReferralCode }),
                       It.IsAny <string>()))
            .Returns(() => Task.FromResult(""));

            _privateInvestorAttributeRepository = new Mock <IPrivateInvestorAttributeRepository>();

            _privateInvestorAttributeRepository
            .Setup(m => m.GetInvestorEmailAsync(
                       It.IsIn(new PrivateInvestorAttributeType[] { PrivateInvestorAttributeType.ReferralCode }),
                       It.IsAny <string>()))
            .Returns(() => Task.FromResult(""));

            _investorTransaction = new InvestorTransaction {
            };

            _investorTransactionRepository = new Mock <IInvestorTransactionRepository>();

            _investorTransactionRepository
            .Setup(m => m.GetAsync(
                       It.Is <string>(v => !string.IsNullOrWhiteSpace(v) && v == "*****@*****.**"),
                       It.IsAny <string>()))
            .Returns(() => Task.FromResult(_investorTransaction));

            _investorTransactionRepository
            .Setup(m => m.SaveAsync(It.IsAny <IInvestorTransaction>()))
            .Returns(() => Task.CompletedTask);

            _investorRefundRepository = new Mock <IInvestorRefundRepository>();

            _investorRefundRepository
            .Setup(m => m.SaveAsync(It.IsAny <string>(), It.IsAny <InvestorRefundReason>(), It.IsAny <string>()))
            .Returns(() => Task.CompletedTask);

            _investmentMailSender = new Mock <IQueuePublisher <InvestorNewTransactionMessage> >();

            _investmentMailSender
            .Setup(m => m.SendAsync(It.IsAny <InvestorNewTransactionMessage>()))
            .Returns(() => Task.CompletedTask);

            _urlEncryptionService = new UrlEncryptionService("E546C8DF278CD5931069B522E695D4F2", "1234567890123456");
            _kycService           = new KycService(_campaignSettingsRepository.Object, _urlEncryptionService);

            _referralCodeService = new ReferralCodeService(_investorAttributeRepository.Object,
                                                           _privateInvestorAttributeRepository.Object);

            return(new TransactionService(
                       _log,
                       _exRateClient.Object,
                       _investorAttributeRepository.Object,
                       _campaignInfoRepository.Object,
                       _campaignSettingsRepository.Object,
                       _investorTransactionRepository.Object,
                       _investorRefundRepository.Object,
                       _investorRepository.Object,
                       _investmentMailSender.Object,
                       _kycService,
                       _referralCodeService,
                       "http://test-ito.valid.global/summary/{token}/overview"));
        }
예제 #16
0
 public KycController(IKycService kycService, IMapper mapper)
 {
     _kycService = kycService;
     _mapper     = mapper;
 }
 public DistributorPortalController(IDistributorPortalService _service, IKycService _kycService)
 {
     this.service    = _service;
     this.kycService = _kycService;
 }
예제 #18
0
 public MasterWalletController(ITransactionService objTransactionService, IKycService _kycService)
 {
     this._TransactionService = objTransactionService;
     this.kycService          = _kycService;
 }
예제 #19
0
 public ChildMerchantController(IChildMerchantService childMerchantService, IKycService kycService, IChainMerchantService _chainMerchantService)
 {
     this.childMerchantService = childMerchantService;
     this.kycService           = kycService;
     this.chainMerchantService = _chainMerchantService;
 }
예제 #20
0
 public CustomerService(ICustomerRepository customerRepository, IKycService _kycService, ICustomerRequestService _customerRequestService)
 {
     _customerRepository    = customerRepository;
     kycService             = _kycService;
     customerRequestService = _customerRequestService;
 }
 public ChainMerchantController(IChainMerchantService chainMerchantService, IKycService _kycService)
 {
     _chainMerchantService = chainMerchantService;
     kycService            = _kycService;
 }