Reply
Highlighted
Contributor
Posts: 10
Registered: ‎08-03-2011
Accepted Solution

Problem with setting line items in the CIM api

[ Edited ]

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?


Accepted Solutions
Highlighted
Solution
Accepted by topic author mps_sudipta
‎08-21-2015 01:58 AM
Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: Problem with setting line items in the CIM api

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


All Replies
Highlighted
Solution
Accepted by topic author mps_sudipta
‎08-21-2015 01:58 AM
Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: Problem with setting line items in the CIM api

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.