cancel
Showing results for 
Search instead for 
Did you mean: 

3 digit security code fails with E00003 cardcode invalid error unless I added leading zero?

Hi!

New PHP integration here. I was testing with my company amex with no issues. But the testers got started and right away are running into this.....

E00003 - cardCode element is invalid - The value XXXXXX is invalid according to its datatype, The Pattern constraint failed.

So I was stumped by this error until one of the testers added a leading 0 to the 3 digit VISA code he was trying to test with and then it worked?

My values are sanitized before sending them over, so I know there are no extra characters being submitted, so is the solution adding a leading 0 if the security code is 3 digits? I'm assuming there is something else going wrong with what I'm sending, but I'm at a loss as to what it could be? Thanks in advance for any help!

aaw
Member
2 REPLIES 2

Thanks for the reply. It turns out it was my fault. I had an input mask on the card code field that only allowed 4 numeric digits. What I didn't realize is that if you entered less than 4, it appended an extra dash at the end of the string.