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.
Solved! Go to Solution.
09-07-2011 09:42 PM - edited 09-07-2011 09:44 PM
If you look at the schema at https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd
<order /> need to come before <lineItems />
09-08-2011 04:34 AM
If you look at the schema at https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd
<order /> need to come before <lineItems />
09-08-2011 04:34 AM
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!
09-08-2011 11:43 AM