diff --git a/app/jobs/resolution_proofing_job.rb b/app/jobs/resolution_proofing_job.rb index 13d355bf9d8..b1934f1b620 100644 --- a/app/jobs/resolution_proofing_job.rb +++ b/app/jobs/resolution_proofing_job.rb @@ -19,8 +19,7 @@ def perform( encrypted_arguments:, trace_id:, should_proof_state_id:, - double_address_verification: false, - ipp_enrollment_in_progress: false, + ipp_enrollment_in_progress:, user_id: nil, threatmetrix_session_id: nil, request_ip: nil, @@ -46,7 +45,6 @@ def perform( threatmetrix_session_id: threatmetrix_session_id, request_ip: request_ip, should_proof_state_id: should_proof_state_id, - double_address_verification: double_address_verification, ipp_enrollment_in_progress: ipp_enrollment_in_progress, instant_verify_ab_test_discriminator: instant_verify_ab_test_discriminator, ) @@ -75,7 +73,6 @@ def make_vendor_proofing_requests( threatmetrix_session_id:, request_ip:, should_proof_state_id:, - double_address_verification:, ipp_enrollment_in_progress:, instant_verify_ab_test_discriminator: ) @@ -85,7 +82,6 @@ def make_vendor_proofing_requests( threatmetrix_session_id: threatmetrix_session_id, request_ip: request_ip, should_proof_state_id: should_proof_state_id, - double_address_verification: double_address_verification, ipp_enrollment_in_progress: ipp_enrollment_in_progress, timer: timer, ) diff --git a/app/services/idv/agent.rb b/app/services/idv/agent.rb index 1bea425d38f..abad581798c 100644 --- a/app/services/idv/agent.rb +++ b/app/services/idv/agent.rb @@ -11,7 +11,7 @@ def proof_resolution( user_id:, threatmetrix_session_id:, request_ip:, - ipp_enrollment_in_progress: false + ipp_enrollment_in_progress: ) document_capture_session.create_proofing_session @@ -28,7 +28,7 @@ def proof_resolution( user_id: user_id, threatmetrix_session_id: threatmetrix_session_id, request_ip: request_ip, - double_address_verification: ipp_enrollment_in_progress, + ipp_enrollment_in_progress: ipp_enrollment_in_progress, } if IdentityConfig.store.ruby_workers_idv_enabled diff --git a/app/services/proofing/resolution/progressive_proofer.rb b/app/services/proofing/resolution/progressive_proofer.rb index 6aed174e67c..81181de79bc 100644 --- a/app/services/proofing/resolution/progressive_proofer.rb +++ b/app/services/proofing/resolution/progressive_proofer.rb @@ -13,12 +13,8 @@ def initialize(instant_verify_ab_test_discriminator = nil) end # @param [Hash] applicant_pii keys are symbols and values are strings, confidential user info - # @param [Boolean] double_address_verification flag that indicates if user will have - # both state id address and current residential address verified. Note this value is here as - # a placeholder until it can be replaced with ipp_enrollment_in_progress in ticket LG-353: - # https://cm-jira.usa.gov/browse/LG-11353 - # @param [Boolean] ipp_enrollment_in_progress flag that indicates if user will have - # both state id address and current residential address verified + # @param [Boolean] ipp_enrollment_in_progress flag is used in place of DAV flag because DAV is + # now always true # @param [String] request_ip IP address for request # @param [Boolean] should_proof_state_id based on state id jurisdiction, indicates if # there should be a state id proofing request made to aamva @@ -33,8 +29,7 @@ def proof( should_proof_state_id:, threatmetrix_session_id:, timer:, - user_email:, - double_address_verification: false + user_email: ) device_profiling_result = proof_with_threatmetrix_if_needed( applicant_pii: applicant_pii, @@ -47,21 +42,16 @@ def proof( residential_instant_verify_result = proof_residential_address_if_needed( applicant_pii: applicant_pii, timer: timer, - double_address_verification: double_address_verification, ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) applicant_pii_transformed = applicant_pii.clone - if ipp_enrollment_in_progress || double_address_verification - applicant_pii_transformed = with_state_id_address(applicant_pii_transformed) - end + applicant_pii_transformed = with_state_id_address(applicant_pii_transformed) instant_verify_result = proof_id_address_with_lexis_nexis_if_needed( applicant_pii: applicant_pii_transformed, timer: timer, residential_instant_verify_result: residential_instant_verify_result, - double_address_verification: double_address_verification, - ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) state_id_result = proof_id_with_aamva_if_needed( @@ -70,13 +60,11 @@ def proof( residential_instant_verify_result: residential_instant_verify_result, instant_verify_result: instant_verify_result, should_proof_state_id: should_proof_state_id, - double_address_verification: double_address_verification, ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) ResultAdjudicator.new( device_profiling_result: device_profiling_result, - double_address_verification: double_address_verification, ipp_enrollment_in_progress: ipp_enrollment_in_progress, resolution_result: instant_verify_result, should_proof_state_id: should_proof_state_id, @@ -118,11 +106,9 @@ def proof_with_threatmetrix_if_needed( def proof_residential_address_if_needed( applicant_pii:, timer:, - double_address_verification: false, - ipp_enrollment_in_progress: false + ipp_enrollment_in_progress: ) - return residential_address_unnecessary_result unless - ipp_enrollment_in_progress || double_address_verification + return residential_address_unnecessary_result unless ipp_enrollment_in_progress timer.time('residential address') do resolution_proofer.proof(applicant_pii) @@ -142,11 +128,8 @@ def resolution_cannot_pass end def proof_id_address_with_lexis_nexis_if_needed(applicant_pii:, timer:, - residential_instant_verify_result:, - double_address_verification:, - ipp_enrollment_in_progress:) - if applicant_pii[:same_address_as_id] == 'true' && - (ipp_enrollment_in_progress || double_address_verification) + residential_instant_verify_result:) + if applicant_pii[:same_address_as_id] == 'true' return residential_instant_verify_result end return resolution_cannot_pass unless residential_instant_verify_result.success? @@ -158,14 +141,11 @@ def proof_id_address_with_lexis_nexis_if_needed(applicant_pii:, timer:, def should_proof_state_id_with_aamva?(ipp_enrollment_in_progress:, same_address_as_id:, should_proof_state_id:, instant_verify_result:, - residential_instant_verify_result:, - double_address_verification:) + residential_instant_verify_result:) return false unless should_proof_state_id # If the user is in double-address-verification and they have changed their address then # they are not eligible for get-to-yes - # rubocop:disable Layout/LineLength - if !(ipp_enrollment_in_progress || double_address_verification) || same_address_as_id == 'true' - # rubocop:enable Layout/LineLength + if !ipp_enrollment_in_progress || same_address_as_id == 'true' user_can_pass_after_state_id_check?(instant_verify_result) else residential_instant_verify_result.success? @@ -177,12 +157,10 @@ def proof_id_with_aamva_if_needed( residential_instant_verify_result:, instant_verify_result:, should_proof_state_id:, - ipp_enrollment_in_progress:, - double_address_verification: + ipp_enrollment_in_progress: ) same_address_as_id = applicant_pii[:same_address_as_id] should_proof_state_id_with_aamva = should_proof_state_id_with_aamva?( - double_address_verification:, ipp_enrollment_in_progress:, same_address_as_id:, should_proof_state_id:, diff --git a/app/services/proofing/resolution/result_adjudicator.rb b/app/services/proofing/resolution/result_adjudicator.rb index 17f37f6f3fb..56d88669bed 100644 --- a/app/services/proofing/resolution/result_adjudicator.rb +++ b/app/services/proofing/resolution/result_adjudicator.rb @@ -2,8 +2,8 @@ module Proofing module Resolution class ResultAdjudicator attr_reader :resolution_result, :state_id_result, :device_profiling_result, - :double_address_verification, :ipp_enrollment_in_progress, - :residential_resolution_result, :same_address_as_id + :ipp_enrollment_in_progress, :residential_resolution_result, + :same_address_as_id def initialize( resolution_result:, # InstantVerify @@ -12,14 +12,12 @@ def initialize( should_proof_state_id:, ipp_enrollment_in_progress:, device_profiling_result:, - same_address_as_id:, - double_address_verification: false + same_address_as_id: ) @resolution_result = resolution_result @state_id_result = state_id_result @should_proof_state_id = should_proof_state_id @ipp_enrollment_in_progress = ipp_enrollment_in_progress - @double_address_verification = double_address_verification @device_profiling_result = device_profiling_result @residential_resolution_result = residential_resolution_result @same_address_as_id = same_address_as_id # this is a string, "true" or "false" @@ -90,7 +88,7 @@ def device_profiling_result_and_reason def resolution_result_and_reason if !residential_resolution_result.success? && same_address_as_id == 'false' && - (ipp_enrollment_in_progress || double_address_verification) + ipp_enrollment_in_progress [false, :fail_resolution_skip_state_id] elsif resolution_result.success? && state_id_result.success? [true, :pass_resolution_and_state_id] diff --git a/spec/jobs/resolution_proofing_job_spec.rb b/spec/jobs/resolution_proofing_job_spec.rb index 7c9e0965fbf..7142ae5077f 100644 --- a/spec/jobs/resolution_proofing_job_spec.rb +++ b/spec/jobs/resolution_proofing_job_spec.rb @@ -17,6 +17,7 @@ let(:threatmetrix_session_id) { SecureRandom.uuid } let(:proofing_device_profiling) { :enabled } let(:lexisnexis_threatmetrix_mock_enabled) { false } + let(:ipp_enrollment_in_progress) { true } before do allow(IdentityConfig.store).to receive(:proofing_device_profiling). @@ -40,6 +41,7 @@ user_id: user.id, threatmetrix_session_id: threatmetrix_session_id, request_ip: request_ip, + ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) end @@ -118,6 +120,7 @@ user_id: user.id, threatmetrix_session_id: threatmetrix_session_id, request_ip: request_ip, + ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) end it 'stores a successful result' do @@ -411,7 +414,7 @@ user_id: user.id, threatmetrix_session_id: threatmetrix_session_id, request_ip: request_ip, - ipp_enrollment_in_progress: true, + ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) end diff --git a/spec/services/idv/agent_spec.rb b/spec/services/idv/agent_spec.rb index 43de10130a4..2886f995cc6 100644 --- a/spec/services/idv/agent_spec.rb +++ b/spec/services/idv/agent_spec.rb @@ -15,6 +15,7 @@ let(:issuer) { 'fake-issuer' } let(:friendly_name) { 'fake-name' } let(:app_id) { 'fake-app-id' } + let(:ipp_enrollment_in_progress) { true } let(:agent) { Idv::Agent.new(applicant) } @@ -41,6 +42,7 @@ user_id: user.id, threatmetrix_session_id: nil, request_ip: request_ip, + ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) result = document_capture_session.load_proofing_result.result @@ -57,6 +59,7 @@ user_id: user.id, threatmetrix_session_id: nil, request_ip: request_ip, + ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) result = document_capture_session.load_proofing_result.result expect(result[:context][:stages][:state_id]).to include( @@ -82,6 +85,7 @@ user_id: user.id, threatmetrix_session_id: nil, request_ip: request_ip, + ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) result = document_capture_session.load_proofing_result.result expect(result[:errors][:ssn]).to eq ['Unverified SSN.'] @@ -97,6 +101,7 @@ user_id: user.id, threatmetrix_session_id: nil, request_ip: request_ip, + ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) result = document_capture_session.load_proofing_result.result @@ -118,6 +123,7 @@ user_id: user.id, threatmetrix_session_id: nil, request_ip: request_ip, + ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) result = document_capture_session.load_proofing_result.result @@ -142,6 +148,7 @@ user_id: user.id, threatmetrix_session_id: nil, request_ip: request_ip, + ipp_enrollment_in_progress: ipp_enrollment_in_progress, ) result = document_capture_session.load_proofing_result.result diff --git a/spec/services/proofing/resolution/progressive_proofer_spec.rb b/spec/services/proofing/resolution/progressive_proofer_spec.rb index 337528cfff9..8f65b95b5f2 100644 --- a/spec/services/proofing/resolution/progressive_proofer_spec.rb +++ b/spec/services/proofing/resolution/progressive_proofer_spec.rb @@ -4,7 +4,6 @@ let(:applicant_pii) { Idp::Constants::MOCK_IDV_APPLICANT_STATE_ID_ADDRESS } let(:should_proof_state_id) { true } let(:ipp_enrollment_in_progress) { true } - let(:double_address_verification) { true } let(:request_ip) { Faker::Internet.ip_v4_address } let(:threatmetrix_session_id) { SecureRandom.uuid } let(:timer) { JobHelpers::Timer.new } @@ -42,7 +41,6 @@ instance.proof( applicant_pii: applicant_pii, ipp_enrollment_in_progress: ipp_enrollment_in_progress, - double_address_verification: double_address_verification, request_ip: request_ip, should_proof_state_id: should_proof_state_id, threatmetrix_session_id: threatmetrix_session_id, @@ -180,7 +178,6 @@ expect(result.same_address_as_id).to eq('true') expect(result.ipp_enrollment_in_progress).to eq(true) - expect(result.double_address_verification).to eq(true) expect(result.resolution_result).to eq(result.residential_resolution_result) end @@ -299,7 +296,6 @@ instance_double(Proofing::Resolution::Result) end let(:ipp_enrollment_in_progress) { true } - let(:double_address_verification) { true } let(:applicant_pii) do JSON.parse(<<-STR, symbolize_names: true) { diff --git a/spec/services/proofing/resolution/result_adjudicator_spec.rb b/spec/services/proofing/resolution/result_adjudicator_spec.rb index 603226a7ca6..7da807de820 100644 --- a/spec/services/proofing/resolution/result_adjudicator_spec.rb +++ b/spec/services/proofing/resolution/result_adjudicator_spec.rb @@ -29,7 +29,6 @@ end let(:should_proof_state_id) { true } - let(:double_address_verification) { true } let(:ipp_enrollment_in_progress) { true } let(:same_address_as_id) { 'false' } @@ -52,7 +51,6 @@ state_id_result: state_id_result, should_proof_state_id: should_proof_state_id, ipp_enrollment_in_progress: ipp_enrollment_in_progress, - double_address_verification: double_address_verification, device_profiling_result: device_profiling_result, same_address_as_id: same_address_as_id, ) @@ -93,33 +91,6 @@ expect(resolution_adjudication_reason).to eq(:fail_state_id) end end - - # rubocop:disable Layout/LineLength - context 'Confirm adjudication works for either double_address_verification or ipp_enrollment_in_progress' do - context 'Adjudication passes if double_address_verification is false and ipp_enrollment_in_progress is true' do - # rubocop:enable Layout/LineLength - let(:double_address_verification) { false } - let(:ipp_enrollment_in_progress) { true } - - it 'returns a successful response' do - result = subject.adjudicated_result - - expect(result.success?).to eq(true) - end - end - # rubocop:disable Layout/LineLength - context 'Adjudication passes if ipp_enrollment_in_progress is false and double_address_verification is true' do - # rubocop:enable Layout/LineLength - let(:double_address_verification) { true } - let(:ipp_enrollment_in_progress) { false } - - it 'returns a successful response' do - result = subject.adjudicated_result - - expect(result.success?).to eq(true) - end - end - end end end end