cancel
Showing results for 
Search instead for 
Did you mean: 

CIM payment validation

I tried putting in my first payment profile and according to the docs "cardCode" should be avilable under payment->creditCard to test CVV.

 

Should this not be used as part of the validation and only during an actual charge?  If so, the documentation last revised 10/20/2009 is out of date.

 

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'.

johncongdon
Member
4 REPLIES 4

The cardCode element can appear in the following 5 places:

 

  1. createCustomerProfileRequest: paymentProfiles -> payment -> creditCard -> cardCode
  2. createCustomerPaymentProfileRequest: paymentProfile -> payment -> creditCard -> cardCode
  3. createCustomerProfileTransactionRequest: transaction -> profileTransAuthOnly | profileTransAuthCapture | profileTransCaptureOnly -> cardCode
  4. updateCustomerPaymentProfileRequest: paymentProfile -> payment -> creditCard -> cardCode
  5. validateCustomerPaymentProfileRequest: cardCode

There is no place where cardCode is a direct child element of the payment element.


Dave Parker
IT DevWorks, LLC
Makers of the I-Bill IT libraries for Authorize.net
Blog: http://www.itdaveworks.com
Twitter: http://twitter.com/rayrad
Site: http://www.itdevworks.com
itdevworks
Trusted Contributor
Trusted Contributor

it doesnt look like it is a direct child of the payment element in the poster's case. it is a child of credit card as in #4 of your examples. I am getting the same error. was this ever resolved?

 

request:

<?xml version="1.0" encoding="utf-8"?>
<updateCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">

...

<paymentProfile><customerType>individual</customerType><billTo><firstName>something</firstName><lastName>something</lastName><address>8800 n olive ave</address><city>culver</city><state>CA</state><zip>90034</zip><country>US</country></billTo><payment><creditCard><cardNumber>XXXX7893</cardNumber><cardCode>123</cardCode><expirationDate>2012-01</expirationDate></creditCard></payment>...</paymentProfile>

<validationMode>liveMode</validationMode>

</updateCustomerPaymentProfileRequest>

 

response:

'code' => 'E00003',
'text' => '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\'.',

Authorize.net XML requests only work with the fields in a specific order. In this case, you have expiration date after card code, when I think it's supposed to go before. Try reversing the order and see if it works.

thanks! that was the issue