public OfflineWithdrawVerificationStatusDTO RiskProfileCheckStatus(Guid id,
                                                                           string brandName,
                                                                           string licenseeName,
                                                                           string playerName)
        {
            var logs = GetStatuses(id, VerificationType.RiskProfileCheck)
                       .ToList()
                       .Select(x => new WithdrawalVerificationLog
            {
                VerificationRule  = x.VerificationRule,
                Status            = RiskResultConverter.GetStatusForRpc(x.IsSuccess, x.VerificationStep).ToString(),
                RuleRequiredValue = x.RuleRequiredValue,
                CurrentValue      = x.CurrentValue
            })
                       .OrderBy(x => x.VerificationRule)
                       .ToArray();

            var verificationHeader = new VerificationDialogHeaderValues
            {
                BrandName     = brandName,
                LicenseeName  = licenseeName,
                PlayerName    = playerName,
                StatusSuccess = logs.All(x => x.Status == "Low") ? "Low" : "High"
            };

            return(new OfflineWithdrawVerificationStatusDTO()
            {
                ListOfAppliedChecks = logs,
                VerificationDialogHeaderValues = verificationHeader
            });
        }
Пример #2
0
        protected override void OnRuleFinish(bool result, Guid withdrawalId, VerificationStep step, CompleteRuleDescriptionAndActualValue metadata = null)
        {
            _logsCommands.LogWithdrawalVerificationStep(
                withdrawalId,
                result,
                VerificationType.RiskProfileCheck,
                step,
                metadata != null ? metadata.CompleteRuleDescription : "-",
                metadata != null ? metadata.RuleRequiredValues : "-",
                metadata != null ? metadata.ActualVerificationValue : "-"
                );

            var withdrawal = _paymentRepository.OfflineWithdraws
                             .Single(o => o.Id == withdrawalId);

            withdrawal.RiskLevelStatus    = RiskResultConverter.GetStatusForRpc(result, step);
            withdrawal.RiskLevelCheckDate = DateTimeOffset.UtcNow;

            _paymentRepository.SaveChanges();
        }