cancel
Showing results for 
Search instead for 
Did you mean: 

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

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.

rpmccormick
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

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

RaynorC1emen7
Expert
2 REPLIES 2

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

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

RaynorC1emen7
Expert

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!