I am using the php_sdk, and for some weird reason, I am getting an error:
Below is the error
Error: Error
Message: The element 'profileTransAuthCapture' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'lineItems' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'amount' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
E00003
And a dump of the transaction object
AuthorizeNetTransaction Object
(
[amount] => 0
[tax] => stdClass Object
(
[amount] =>
[name] =>
[description] =>
)
[shipping] => stdClass Object
(
[amount] =>
[name] =>
[description] =>
)
[duty] => stdClass Object
(
[amount] =>
[name] =>
[description] =>
)
[lineItems] => Array
(
[0] => AuthorizeNetLineItem Object
(
[itemId] => 3
[name] => Gold(recurring, overdue)
[description] => sda sd asf sadgasdasdas gbdg dfgad sad
Under Package:Package3
[quantity] =>
[unitPrice] => 0
[taxable] =>
)
[1] => AuthorizeNetLineItem Object
(
[itemId] => 7
[name] => Weekly Hours 2(recurring, overdue)
[description] => sad asd as fasdf gfdg dfgsadf asd sd
Under Package:Package3
[quantity] =>
[unitPrice] => 0
[taxable] =>
)
)
[customerProfileId] => 4407284
[customerPaymentProfileId] => 3881219
[customerShippingAddressId] =>
[creditCardNumberMasked] =>
[bankRoutingNumberMasked] =>
[bankAccountNumberMasked] =>
[order] => stdClass Object
(
[invoiceNumber] =>
[description] =>
[purchaseOrderNumber] =>
)
[taxExempt] =>
[recurringBilling] =>
[cardCode] =>
[splitTenderId] =>
[approvalCode] =>
[transId] =>
)
Any ideas?
Solved! Go to Solution.
09-01-2011 03:45 AM - edited 09-01-2011 03:50 AM
Would be helpful to see the code you used to create this, and are you using a recent version of the API? If I had to guess, though, I'd say that the error is being caused by elements not containing values and/or not being in the specific order that Authorize.net expects. Your amount is 0, for instance, so it could be skipping that and then running into lineItems, which isn't expected until after amount. I'm only theorizing, though.
09-01-2011 05:01 AM
Would be helpful to see the code you used to create this, and are you using a recent version of the API? If I had to guess, though, I'd say that the error is being caused by elements not containing values and/or not being in the specific order that Authorize.net expects. Your amount is 0, for instance, so it could be skipping that and then running into lineItems, which isn't expected until after amount. I'm only theorizing, though.
09-01-2011 05:01 AM