refactor(core): moved the fingerprint_key_hash from configs to merchant_account table #5277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
fingerprint_hash_key
which is used byhyperswitch_card_vault
for performing HMAC hash on the payment_method_data for storing it.We had this value previously stored in
configs
table in raw String.We have refactored it, to be stored in
merchant_account
table(encrypted beforehand by our DEK).Additional Changes
Motivation and Context
How did you test it?
Generating fingerprints
/blocklist/toggle?status=true
. More abouttoggling guard here.
fingerprint_id
in the response. This can be used to block theinstrument. If the payment was able to be captured the fingerprint will be stored in the intent table as well
Blocking fingerprints
Refer to the attached postman collection for the API contracts for the blocklist APIs(Description). Currently we support blocking three types of resources i.e. card numbers (payment intrument), card bin, and extended card bin.
blocklist_api_postman.zip
Once
fingerprint
(from the above point 2) is generated,and for the created merchant, we can find in
merchant_account
table that the colfingerprint_hash_key
exists and has some value, we can be sure that this refactor is working fine.Checklist
cargo +nightly fmt --all
cargo clippy