I keep getting an error on this XML that is sent. Note: I have written "*" where some data goes I do not wish to share. Thank you for any help!
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 'subscription' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'customer' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'shipTo' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.</text> </message> </messages> </ErrorResponse>
XML SENT:
<?xml version="1.0"?>
<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>47V4Uej6</name>
<transactionKey>95r933WDW6mb75fQ</transactionKey>
</merchantAuthentication>
<refId>7</refId>
<subscription>
<name>****</name>
<paymentSchedule>
<interval>
<length>1</length>
<unit>months</unit>
</interval>
<startDate>2012-01-23</startDate>
<totalOccurrences>9999</totalOccurrences>
</paymentSchedule>
<amount>12.99</amount>
<payment>
<creditCard>
<cardNumber>4111111111111111</cardNumber>
<expirationDate>122016</expirationDate>
</creditCard>
</payment>
<billTo>
<firstName>****</firstName>
<lastName>****</lastName>
</billTo>
<customer>
<id>7</id>
<email>****</email>
</customer>
</subscription>
</ARBCreateSubscriptionRequest>
Solved! Go to Solution.
12-23-2011 09:31 PM
Sequence matter, <customer /> should be before <billTo />
12-24-2011 05:54 AM
Sequence matter, <customer /> should be before <billTo />
12-24-2011 05:54 AM
Ah, yes.
Thank you sir!
12-27-2011 09:05 AM