- 13 Jul 2022
- 1 Minute to read
- Print
- DarkLight
My Credit Card Didn't Get Masked!
- Updated on 13 Jul 2022
- 1 Minute to read
- Print
- DarkLight
You need to make sure that you are testing with a valid credit card number. Try Validate Credit Card Numbers or something similar.
If any of those checkmarks are red, then you probably are not using a valid credit card number for your testing. Try using a dummy credit card number generator like: https://saijogeorge.com/dummy-credit-card-generator/
Blackthorn Compliance checks two things:
- Does the number match a regular expression in an active Detection Pattern?
- Does the number pass the Luhn Algorithm?
If either of those are false, then the credit card number will not be masked. The Luhn Algorithm helps avoid matching international phone numbers, tracking numbers, and other common false positives.
If you don't want to use the Luhn Algorithm (please think twice about this as it significantly reduces your false positive rate), then you need to uncheck the checkbox field "LuhnCheck" on the specific Detection Pattern you are testing:
Setup > Custom Metadata Types > DetectionPattern > Manage DetectionPatterns > Edit the DetectionPattern you are testing
This field controls whether or not Compliance validates the credit card number for the particular Detection Pattern. Try unchecking that field and re-test with the same credit card number.
If the issue persists, one of the required extension packages is likely missing. For example, if you are trying to test masking in emails, then you need to install this extension package first.