KateA
KateA

Reputation: 701

Authorize NET exception Line item 1 is invalid

Can someone help to set up multiple line items for transaction in Authorize NET

here is code example

 var lineItem = new LineItemType();
                    lineItem.itemId = "test";
                    lineItem.name = paymentDetail.Name;
                    lineItem.description = paymentDetail.StartDate.ToShortDateString();
                    lineItem.quantity = paymentDetail.Quantity;
                    lineItem.unitPrice = paymentDetail.UnitPrice;
                    lineItem.taxable = false;

I am getting error:

Response Sub Code: 1

Response Reason Code: 270

Response Reason Details: Line item 1 is invalid.

Upvotes: 1

Views: 1613

Answers (1)

John Conde
John Conde

Reputation: 219894

Line Item quanitity can only be up to two decimal places. So if you change your quanitity from 0.5668 to 0.57 it will also work. (See page 24 of the AIM guide)

Upvotes: 5

Related Questions