Showing results for 
Search instead for 
Did you mean: 

Ruby authorize-net LineItem and TRANSACTION_FIELDS mapping mismatch

Gem Version: 1.5.2


We are using authorize-net 1.5.2 gem to create transaction requests. When trying to create a transaction using an order with line items, the follow error occurs:


The element 'lineItems' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has incomplete content. List of possible elements expected: 'unitPrice' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.

However, inspection of the line item show that the price is set.  The problem occurs because the symbol key for the price in LineItem does not make the symbol key in TRANSACTION_FIELDS.

In AuthorizeNet::LineItem, the key is :line_item_price:

Please click the View Source link to see the code.


In AuthorizeNet::CIM::Fields::TRANSACTION_FIELDS, the key is :line_item_unit_price:


Is there a fix for this in the next release of the gem?