Reply
Highlighted
Contributor
Posts: 16
Registered: ‎11-15-2010
Accepted Solution

Bug in AIM over XML (is <order> part of the schema or not?)

[ Edited ]

I am using "createTransactionRequest" over XML.  This is part of my packet:

 

<order>

  <invoiceNumber>InvoiceID</invoiceNumber>

  <description>payment for HotelID</description>

</order>

 

It worked fine until I decided to add <lineItems>.  When I added multiple line items, I get this error:

<?xml version="1.0" encoding="utf-8"?><ErrorResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">

  <messages>

    <resultCode>Error</resultCode>

    <message>

      <code>E00003</code>

      <text>The element 'transactionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'order' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.  List of possible elements expected: 'tax, duty, shipping, taxExempt, poNumber, customer, billTo, shipTo, customerIP, cardholderAuthentication, retail, transactionSettings, userFields' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.</text>

    </message>

  </messages>

</ErrorResponse>

 

 

What is going on?    -or, if someone can just tell me that lineitems are not included in the email to the charged customer, then I just wont worry about it at all...  but if they are included in the email, then I would like to use them, and I don't get how using them breaks the <order> block!?!

 

Thanks.

 

PS: I like using the <order> block, because that information (the invioce# and description) appears on both emails to me and my customer.


Accepted Solutions
Highlighted
Solution
Accepted by topic author rpmccormick
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Bug in AIM over XML (is <order> part of the schema or not?)

If you look at the schema at https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd

<order /> need to come before <lineItems />

View solution in original post


All Replies
Highlighted
Solution
Accepted by topic author rpmccormick
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Bug in AIM over XML (is <order> part of the schema or not?)

If you look at the schema at https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd

<order /> need to come before <lineItems />

Highlighted
Contributor
Posts: 16
Registered: ‎11-15-2010

Re: Bug in AIM over XML (is <order> part of the schema or not?)

Interesting, I had no idea the leaf order mattered in any XML...  I thought that was the whole point, that all peers on the nested tree were created equal.  Still, it would be great to update the error message that it gives under that condition, as it is very misleading.

 

Thanks for the help!