0
votes

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?

1

1 Answers

0
votes

To answer your question I'd have to get a look at your function. You didn't include that here for review.

That said, I'm curious why you're messing with that at all..?? If the credit card is invalid the PayPal API will return an error that informs the user of this. Let their system handle it for you. No need to add extra checks of your own.