-
Notifications
You must be signed in to change notification settings - Fork 166
LG-14725: Identity resolution with Socure #11479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f94bfd4
0a6c141
b3ab742
392fd6b
ebcf54d
33053e7
e0356df
7acd1aa
20692f7
d75c74d
de31563
da2f602
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,9 @@ class SpCostTypeError < StandardError; end | |
| acuant_result | ||
| lexis_nexis_resolution | ||
| lexis_nexis_address | ||
| mock_resolution | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We were previously creating SP cost records for mock resolutions as |
||
| gpo_letter | ||
| socure_resolution | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checking with biz ops to make sure this new SP cost type doesn't make anything explode.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Chris had expressed to me a desire to have FA1 and FA3 Socure calls recorded separately, since they are separate products. I think this naming is probably a good precedent if Timnit will be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ got the ok that sending a new sp cost type will not break anything |
||
| threatmetrix | ||
| ].freeze | ||
|
|
||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| module Proofing | ||
| module Resolution | ||
| module Plugins | ||
| class ResidentialAddressPlugin | ||
| attr_reader :proofer, :sp_cost_token | ||
|
|
||
| def initialize( | ||
| proofer:, | ||
| sp_cost_token: | ||
| ) | ||
| @proofer = proofer | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Responsibility for creating |
||
| @sp_cost_token = sp_cost_token | ||
| end | ||
|
|
||
| def call( | ||
| applicant_pii:, | ||
| current_sp:, | ||
| ipp_enrollment_in_progress:, | ||
| timer: | ||
| ) | ||
| return residential_address_unnecessary_result unless ipp_enrollment_in_progress | ||
|
|
||
| timer.time('residential address') do | ||
| proofer.proof(applicant_pii) | ||
| end.tap do |result| | ||
| Db::SpCost::AddSpCost.call( | ||
| current_sp, | ||
| sp_cost_token, | ||
| transaction_id: result.transaction_id, | ||
| ) | ||
| end | ||
| end | ||
|
|
||
| def residential_address_unnecessary_result | ||
| Proofing::Resolution::Result.new( | ||
| success: true, | ||
| errors: {}, | ||
| exception: nil, | ||
| vendor_name: 'ResidentialAddressNotRequired', | ||
| ) | ||
| end | ||
| end | ||
| end | ||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,9 @@ | |
| module Proofing | ||
| module Resolution | ||
| module Plugins | ||
| class InstantVerifyStateIdAddressPlugin | ||
| class StateIdAddressPlugin | ||
| attr_reader :proofer, :sp_cost_token | ||
|
|
||
| SECONDARY_ID_ADDRESS_MAP = { | ||
| identity_doc_address1: :address1, | ||
| identity_doc_address2: :address2, | ||
|
|
@@ -12,18 +14,26 @@ class InstantVerifyStateIdAddressPlugin | |
| identity_doc_zipcode: :zipcode, | ||
| }.freeze | ||
|
|
||
| def initialize( | ||
| proofer:, | ||
| sp_cost_token: | ||
| ) | ||
| @proofer = proofer | ||
| @sp_cost_token = sp_cost_token | ||
| end | ||
|
|
||
| def call( | ||
| applicant_pii:, | ||
| current_sp:, | ||
| instant_verify_residential_address_result:, | ||
| residential_address_resolution_result:, | ||
| ipp_enrollment_in_progress:, | ||
| timer: | ||
| ) | ||
| if same_address_as_id?(applicant_pii) && ipp_enrollment_in_progress | ||
| return instant_verify_residential_address_result | ||
| return residential_address_resolution_result | ||
| end | ||
|
|
||
| return resolution_cannot_pass unless instant_verify_residential_address_result.success? | ||
| return resolution_cannot_pass unless residential_address_resolution_result.success? | ||
|
|
||
| applicant_pii_with_state_id_address = | ||
| if ipp_enrollment_in_progress | ||
|
|
@@ -37,33 +47,18 @@ def call( | |
| end.tap do |result| | ||
| Db::SpCost::AddSpCost.call( | ||
| current_sp, | ||
| :lexis_nexis_resolution, | ||
| sp_cost_token, | ||
| transaction_id: result.transaction_id, | ||
| ) | ||
| end | ||
| end | ||
|
|
||
| def proofer | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Logic moved into |
||
| @proofer ||= | ||
| if IdentityConfig.store.proofer_mock_fallback | ||
| Proofing::Mock::ResolutionMockClient.new | ||
| else | ||
| Proofing::LexisNexis::InstantVerify::Proofer.new( | ||
| instant_verify_workflow: IdentityConfig.store.lexisnexis_instant_verify_workflow, | ||
| account_id: IdentityConfig.store.lexisnexis_account_id, | ||
| base_url: IdentityConfig.store.lexisnexis_base_url, | ||
| username: IdentityConfig.store.lexisnexis_username, | ||
| password: IdentityConfig.store.lexisnexis_password, | ||
| hmac_key_id: IdentityConfig.store.lexisnexis_hmac_key_id, | ||
| hmac_secret_key: IdentityConfig.store.lexisnexis_hmac_secret_key, | ||
| request_mode: IdentityConfig.store.lexisnexis_request_mode, | ||
| ) | ||
| end | ||
| end | ||
|
|
||
| def resolution_cannot_pass | ||
| Proofing::Resolution::Result.new( | ||
| success: false, errors: {}, exception: nil, vendor_name: 'ResolutionCannotPass', | ||
| success: false, | ||
| errors: {}, | ||
| exception: nil, | ||
| vendor_name: 'ResolutionCannotPass', | ||
| ) | ||
| end | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.