I have applied the change as described, but I have tried my test for InstaPayment cards (see #16) and I discovered that the problem seems to be related to validateLength, because it expects a card number 16 characters long and with the checksum it has 17 (if I understand this right). This is the test I am trying to get working:
The first one fails because it is 17 characters long.
UPDATE: Ok, I found that the problem was the InstaPayment card number generator I was using. I have changed all numbers using a new one and Luhn check works perfectly with this fix.
PR for #43
I have applied the change as described, but I have tried my test for InstaPayment cards (see #16) and I discovered that the problem seems to be related to
validateLength
, because it expects a card number 16 characters long and with the checksum it has 17 (if I understand this right). This is the test I am trying to get working:The first one fails because it is 17 characters long.
UPDATE: Ok, I found that the problem was the InstaPayment card number generator I was using. I have changed all numbers using a new one and Luhn check works perfectly with this fix.