Skip to content
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

340 BAD_MASK Cause error response for 14-digit credit card #30

Open
peacefulseeker opened this issue Jul 26, 2023 · 4 comments
Open

340 BAD_MASK Cause error response for 14-digit credit card #30

peacefulseeker opened this issue Jul 26, 2023 · 4 comments

Comments

@peacefulseeker
Copy link

peacefulseeker commented Jul 26, 2023

We've noticed that some Inquiry requests with PENC marked as MASK and having a 14-digit long credit card mask
are not meeting the regex expectation.

Full error message received during processing the request.

{"ERRO": 340, "ERROR_0": "340 BAD_MASK Cause: [value [123456XXXX1111] did not match regex /^\\d{6}X{5,9}\\d{1,4}$/], Field: [PTOK], Value: [123456XXXX1111]", "ERROR_COUNT": 1, "MODE": "E", "WARNING_COUNT": 0}

123456XXXX1111 - 14-digit long credit card mask number(replaced digits for real customer mask, but kept the length),
and it's indeed not matching the regex, because the amount of X is expected to be at least 5, while 14-digit CCs will have 4, given then BIN is 6-digit long, which is the case for Discover credit cards.

How would you recommend evaluating such credit cards? We had ~ 80 cases where the Discover credit card has failed to be evaluated because of the issue described.

Perhaps the regex expectation should be changed from your side?

P.S. We're using kount-ris-sdk==3.2.0

@jarrettmitchell-zz
Copy link
Contributor

jarrettmitchell-zz commented Jul 26, 2023 via email

@peacefulseeker
Copy link
Author

Thanks for the suggestion. In this case, the original credit card mask length and payment token length would not match.
Won't that be an issue based on the docs https://developer.kount.com/hc/en-us/articles/11301589488404-Payment-Encryption-PENC-Options?
Screenshot 2023-07-27 at 08 49 54

@jarrettmitchell-zz
Copy link
Contributor

jarrettmitchell-zz commented Jul 27, 2023 via email

@peacefulseeker
Copy link
Author

Thanks @jarrettmitchell-zz for quick help here 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants