cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with setting line items in the CIM api

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?

mps_sudipta
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

TJPride
Expert
1 REPLY 1

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.

TJPride
Expert