Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions app/services/doc_auth/lexis_nexis/responses/true_id_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def initialize(http_response, config, liveness_checking_enabled = false)
# document type
# bar code attention
def successful_result?
(all_passed? || attention_with_barcode?) && id_type_supported?
doc_auth_success? &&
(@liveness_checking_enabled ? selfie_passed? : true)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'm sorry to wave back on my approval @amirbey, after reviewing a comment by @eileen-nava on the previous iteration of this code, I'm not sure this change would cover the attention_with_barcode? case (tagged you in the conversation on the doc).

I did find when changing the logic to all_passed? to account for selfie, that this successful_result? didn't have tests. I added them for the selfie, but I wonder if now with all these questions on the logic, if we really need to add tests for the other cases (ie, no selfie but attention with barcode, etc).

I wasn't sure if I should change my review to "request changes", but I'm not sure if that should / could be a separate ticket.

end

# all checks from document perspectives, without considering selfie:
Expand Down Expand Up @@ -193,15 +194,6 @@ def basic_logging_info
}
end

# Status of all checks from Vendor perspective
def all_passed?
transaction_status_passed? &&
true_id_product.present? &&
product_status_passed? &&
doc_auth_result_passed? &&
(@liveness_checking_enabled ? selfie_passed? : true)
end

def selfie_result
portrait_match_results&.dig(:FaceMatchResult)
end
Expand Down
Loading