Closed jesse-thomas closed 11 months ago
Ahh thanks Jesse! I should have checked our own code for that. Will get this fixed in the repository this week.
Fixed in https://github.com/ParadoxLabs-Inc/tokenbase/commit/5d3ade06fd92a33de6eac543d75e3d918e104b98
Please patch via https://github.com/ParadoxLabs-Inc/tokenbase/commit/5d3ade06fd92a33de6eac543d75e3d918e104b98.diff or install dev-master
if you need it before the next release (no ETA).
Thanks again
thanks @rhoerr
A few things seem to suggest this change is correct. Basic logic for cc validation (cards should begin with a common pattern vs a pattern anywhere) and
Our issue started with a couple customers being unable to save a card to their account with the validation message "credit card does not match credit card type"
And this magento issue looked like it was it. But i'm being told that 676770|676774 where not in the pattern.
So I might be having seperate issue. I'll make a propper report if I find something.
Thanks!
Please do if you find a repeatable process. Thank you!
We just had an issue reported and I think I found it in your code as well. Magento hasn't fixed it yet. A few people are confirming this though.
The regex checks for a string at the begining then anywhere.
'pattern' => '^6759(?!24|38|40|6[3-9]|70|76)|676770|676774\d*$',
should be something like below so its only checking the begining.
'pattern' => '^(6759(?!24|38|40|6[3-9]|70|76)|676770|676774)\d*$',
https://github.com/magento/magento2/issues/36332
https://github.com/ParadoxLabs-Inc/tokenbase/blob/974638ce1f5ffd3408a0abddc61427e2ded8c85d/Gateway/Validator/CreditCard/Types.php#L133