Esempio n. 1
0
        public FxPaygatePaymentUrlInputValidationModel(
            IHttpContextAccessor httpContextAccessor,
            IAssetsHelper assetHelper,
            IAssetDisclaimersClient assetDisclaimersClient,
            IPaymentSystemClient paymentSystemClient,
            IPersonalDataService personalDataService,
            IClientAccountClient clientAccountService,
            IAssetsService assetsService,
            IKycStatusService kycStatusService,
            ITierClient tierClient,
            IRateCalculatorClient rateCalculatorClient)
        {
            _assetsHelper           = assetHelper;
            _assetDisclaimersClient = assetDisclaimersClient;
            _clientAccountService   = clientAccountService;
            _assetsService          = assetsService;
            _kycStatusService       = kycStatusService;
            _tierClient             = tierClient;
            _rateCalculatorClient   = rateCalculatorClient;

            _clientId = httpContextAccessor.HttpContext.User?.Identity?.Name;
            var paymentLimitsTask = paymentSystemClient.GetPaymentLimitsAsync();
            var pdTask            = personalDataService.GetAsync(_clientId);

            Task.WhenAll(paymentLimitsTask, pdTask).GetAwaiter().GetResult();

            _paymentLimitsResponse = paymentLimitsTask.Result;
            _personalData          = pdTask.Result;
            RegisterRules();
        }
Esempio n. 2
0
        private void DownloadPayments(IPaymentSystemClient paymentSource, DateTime startDt)
        {
            if (startDt < paymentSource.CommonSettings.HistoryStart)
            {
                startDt = paymentSource.CommonSettings.HistoryStart;
            }

            while (startDt < DateTime.Now.AddDays(1))
            {
                var endDt = startDt.AddDays(paymentSource.CommonSettings.BatchSizeDays);

                m_paymentRepository.PreloadCache(startDt, endDt);

                m_log.Info($"Stahuji platby ze zdroje {paymentSource.Entity.Description} {startDt} - {endDt}");

                var payments = paymentSource.GetPayments(startDt, endDt).ToList();

                m_log.Info($"Stazeno {payments.Count} zaznamu");

                using (var trx = m_database.OpenTransaction())
                {
                    foreach (var payment in payments)
                    {
                        m_paymentRepository.SavePayment(payment);
                    }

                    trx.Commit();
                }

                m_log.Info("Ulozeno");

                startDt = endDt;
            }
        }
Esempio n. 3
0
        public DepositsController(
            IPaymentSystemClient paymentSystemService,
            Link4PayService.Link4PayServiceClient link4PayServiceClient,
            IFeeCalculatorClient feeCalculatorClient,
            IAssetsHelper assetsHelper,
            IBlockchainWalletsClient blockchainWalletsClient,
            IClientDialogsClient clientDialogsClient,
            ISwiftCredentialsClient swiftCredentialsClient,
            IKycStatusService kycStatusService,
            IPersonalDataService personalDataService,
            ILimitationsServiceClient limitationsServiceClient,
            IClientAccountClient clientAccountClient,
            IRequestContext requestContext,
            ISrvBlockchainHelper srvBlockchainHelper,
            ISiriusWalletsService siriusWalletsService)
        {
            _paymentSystemService     = paymentSystemService;
            _link4PayServiceClient    = link4PayServiceClient;
            _feeCalculatorClient      = feeCalculatorClient;
            _assetsHelper             = assetsHelper;
            _blockchainWalletsClient  = blockchainWalletsClient;
            _clientDialogsClient      = clientDialogsClient;
            _swiftCredentialsClient   = swiftCredentialsClient;
            _kycStatusService         = kycStatusService;
            _personalDataService      = personalDataService;
            _limitationsServiceClient = limitationsServiceClient;
            _clientAccountClient      = clientAccountClient;
            _requestContext           = requestContext;
            _srvBlockchainHelper      = srvBlockchainHelper;
            _siriusWalletsService     = siriusWalletsService;

            _coloredAssetIds = new[]
            {
                LykkeConstants.LykkeAssetId,
                LykkeConstants.LykkeForwardAssetId,
                LykkeConstants.HcpAssetId
            }.ToHashSet();
        }