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
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def build_request_body
policy: IdentityConfig.store.lexisnexis_threatmetrix_policy,
service_type: 'all',
session_id: applicant[:threatmetrix_session_id],
ssn_hash: OpenSSL::Digest::SHA256.hexdigest(applicant[:ssn].gsub(/\D/, '')),
national_id_number: applicant[:ssn].gsub(/\D/, ''),
national_id_type: 'US_SSN',
input_ip_address: applicant[:request_ip],
local_attrib_1: applicant[:uuid_prefix],
}.to_json
Expand Down
3 changes: 2 additions & 1 deletion spec/fixtures/proofing/lexis_nexis/ddp/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"policy": "test-policy",
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.

looks good. not a blocker but we might want to update the sample response here which has ssn_hash_result : spec/fixtures/proofing/lexis_nexis/ddp/successful_response.json

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

made some updates to it!

"service_type": "all",
"session_id": "UNIQUE_SESSION_ID",
"ssn_hash": "15e2b0d3c33891ebb0f1ef609ec419420c20e320ce94c65fbc8c3312448eb225",
"national_id_number": "123456789",
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.

(not a blocker) do you think this would be easier to keep in sync if we removed it as a fixture file and inlined it in the spec?

Copy link
Copy Markdown
Contributor Author

@jskinne3 jskinne3 Aug 26, 2022

Choose a reason for hiding this comment

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

I guess a little, because it's moderately easier to determine what specs to run if the data is right in the relevant spec. But I don't think I want to change it now.

"national_id_type": "US_SSN",
"input_ip_address": "127.0.0.1",
"local_attrib_1": "ABCD"

Expand Down
13 changes: 2 additions & 11 deletions spec/fixtures/proofing/lexis_nexis/ddp/successful_response.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
{
"account_address_result": "success",
"account_address_score": "0",
"account_email_result": "success",
"account_email_score": "0",
"account_name_result": "success",
"account_name_score": "0",
"account_telephone_result": "success",
"account_telephone_score": "0",
"request_id": "1234",
"request_result": "success",
"review_status": "pass",
"risk_rating": "trusted",
"ssn_hash_result": "success",
"ssn_hash_score": "0",
"summary_risk_score": "-6",
"tmx_risk_rating": "neutral"
"tmx_risk_rating": "neutral",
"fraudpoint.score": "500"
}