public async Task Handle(PerformEmploymentCheckRequest notification) { try { _logger.Info($"Performing employment check for {notification.NationalInsuranceNumber}"); var checkPassed = await DoEmploymentCheck(notification); _logger.Info($"Employment check completed for {notification.NationalInsuranceNumber}, result = {checkPassed}"); await _employmentCheckService.CompleteEmploymentCheck(notification.NationalInsuranceNumber, notification.Uln, notification.EmployerAccountId, notification.Ukprn, checkPassed); } catch (Exception ex) { _logger.Error(ex, $"Error performing employment check - {ex.Message}"); throw; } }
private async Task CreateNegativeEmploymentCheckResult(RequestEmploymentCheckForEmployerPayeSchemesRequest notification) { await _employmentCheckService.CompleteEmploymentCheck(notification.NationalInsuranceNumber, notification.Uln, notification.Ukprn, false); }