diff --git a/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/IdentityVerificationService.java b/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/IdentityVerificationService.java index 3b57b8f63..e39966c66 100644 --- a/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/IdentityVerificationService.java +++ b/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/IdentityVerificationService.java @@ -264,14 +264,17 @@ public void startVerification(OwnerId ownerId, IdentityVerificationEntity identi .map(DocumentVerificationEntity::getUploadId) .collect(Collectors.toList()); - DocumentsVerificationResult result = documentVerificationProvider.verifyDocuments(ownerId, uploadIds); - auditService.auditDocumentVerificationProvider(identityVerification, "Documents verified: {} for user: {}", result.getStatus(), ownerId.getUserId()); + final DocumentsVerificationResult result = documentVerificationProvider.verifyDocuments(ownerId, uploadIds); + final String verificationId = result.getVerificationId(); + final DocumentVerificationStatus status = result.getStatus(); + logger.info("Verified documents upload ID: {}, verification ID: {}, status: {}, {}", uploadIds, verificationId, status, ownerId); + auditService.auditDocumentVerificationProvider(identityVerification, "Documents verified: {} for user: {}", status, ownerId.getUserId()); moveToPhaseAndStatus(identityVerification, IdentityVerificationPhase.DOCUMENT_VERIFICATION, IdentityVerificationStatus.IN_PROGRESS, ownerId); docVerifications.forEach(docVerification -> { docVerification.setStatus(DocumentStatus.VERIFICATION_IN_PROGRESS); - docVerification.setVerificationId(result.getVerificationId()); + docVerification.setVerificationId(verificationId); docVerification.setTimestampLastUpdated(ownerId.getTimestamp()); auditService.auditDebug(docVerification, "Started document verification for user: {}", ownerId.getUserId()); }); diff --git a/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/document/DocumentProcessingService.java b/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/document/DocumentProcessingService.java index d43fe7dca..89ff6f5c9 100644 --- a/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/document/DocumentProcessingService.java +++ b/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/document/DocumentProcessingService.java @@ -431,9 +431,11 @@ private void processDocsSubmitResults(OwnerId ownerId, DocumentVerificationEntit private void verifyDocumentWithUpload(OwnerId ownerId, DocumentVerificationEntity docVerification, String uploadId) { try { - DocumentsVerificationResult docsVerificationResult = - documentVerificationProvider.verifyDocuments(ownerId, List.of(uploadId)); - docVerification.setVerificationId(docsVerificationResult.getVerificationId()); + final DocumentsVerificationResult result = documentVerificationProvider.verifyDocuments(ownerId, List.of(uploadId)); + final String verificationId = result.getVerificationId(); + final DocumentVerificationStatus status = result.getStatus(); + logger.info("Verified document upload ID: {}, verification ID: {}, status: {}, {}", uploadId, verificationId, status, ownerId); + docVerification.setVerificationId(verificationId); } catch (DocumentVerificationException | RemoteCommunicationException e) { logger.debug("Unable to verify document with uploadId: {}, {}", uploadId, ownerId, e); logger.warn("Unable to verify document with uploadId: {}, reason: {}, {}", uploadId, e.getMessage(), ownerId);