cancel
Showing results for 
Search instead for 
Did you mean: 

The element 'creditCard' in namespace has invalid child element 'cardCode'

E00003: The element 'creditCard' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'cardCode' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'expirationDate' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.

Getting the above error.  It makes no sense, because this is a valid element.

I have the XML request and response if there is some way to post that here.

BrianKitt
Member
3 REPLIES 3

I have seen some weird errors if you have fields in the wrong order.

kabutotx
Regular Contributor

Sorry for the long delay, life got in the way.

 

How can fields be in the wrong order?   I pass an object to Authorize.NET and it serializes the object per the XML in the WSDL?  

 

I am using the same WSDL for both prod and test and prod works fine.   Test (sandbox) does not?

If you could add the request (with a test card) that would help in troubleshooting. It should look something like this:

 

<creditCard>

<cardNumber>5424000000000015</cardNumber>

<expirationDate>2020-12</expirationDate>

<cardCode>999</cardCode>

</creditCard>