In my PayPal Pro credit card payment system, I use the Luhn algorithm function given in the first answer to this question. However, I have several US clients who apparently tried to pay with their credit cards and their details were rejected by the function (return false), although my script allows them to try any number of times.
At the same time, I know other clients' CC details were indeed accepted by the function and payments were successful.
I conclude there must be something wrong with the function itself. Is that possible?