Skip to content

Commit

Permalink
Fix #484: Consolidate ZenId verification ID
Browse files Browse the repository at this point in the history
Add logging
  • Loading branch information
banterCZ committed Nov 1, 2022
1 parent 29b8458 commit 5dcdf3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ public void startVerification(OwnerId ownerId, IdentityVerificationEntity identi
.map(DocumentVerificationEntity::getUploadId)
.collect(Collectors.toList());

DocumentsVerificationResult result = documentVerificationProvider.verifyDocuments(ownerId, uploadIds);
final DocumentsVerificationResult result = documentVerificationProvider.verifyDocuments(ownerId, uploadIds);
logger.info("Verified documents upload ID: {}, verification ID: {}, {}", uploadIds, result.getVerificationId(), ownerId);
auditService.auditDocumentVerificationProvider(identityVerification, "Documents verified: {} for user: {}", result.getStatus(), ownerId.getUserId());

moveToPhaseAndStatus(identityVerification, IdentityVerificationPhase.DOCUMENT_VERIFICATION, IdentityVerificationStatus.IN_PROGRESS, ownerId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,10 @@ 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();
logger.info("Verified document upload ID: {}, verification ID: {}, {}", uploadId, verificationId, 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);
Expand Down

0 comments on commit 5dcdf3c

Please sign in to comment.