cancel
Showing results for 
Search instead for 
Did you mean: 

Error 270, Line item 1 is invalid. with AIM php integration

Hi, 

I am getting error 270, Line item 1 is invalid. with certain orders but I cannot find anything to differentiate them from good orders. I have attached my logs (with character replaced for privacy).

 

02-24-2016 @ 15:11:58 - Request
method: POST
uri: https://api.authorize.net/xml/v1/request.api
user-agent: WooCommerce-Authorize.net-AIM-Gateway/3.5.1 (WooCommerce/2.5.2; WordPress/4.4.2)
headers: Array
(
    [content-type] => application/xml
    [accept] => application/xml
)

body: <?xml version="1.0" encoding="UTF-8"?>
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name>*********</name>
    <transactionKey>****************</transactionKey>
  </merchantAuthentication>
  <refId>######</refId>
  <transactionRequest>
    <transactionType>authCaptureTransaction</transactionType>
    <amount>53.00</amount>
    <currencyCode>USD</currencyCode>
    <payment>
      <creditCard>
        <cardNumber>4***********####</cardNumber>
        <expirationDate>##-##</expirationDate>
        <cardCode>***</cardCode>
      </creditCard>
    </payment>
    <solution>
      <id>########</id>
    </solution>
    <order>
      <invoiceNumber>2####</invoiceNumber>
      <description>##### ####### ### - Order 2####</description>
    </order>
    <lineItems>
      <lineItem>
        <itemId>4269</itemId>
        <name>#######​ ### UNIT 1003 Linen...</name>
        <description>SKU: ​####, Booking Date: August 6, 2016, Duration: 1 weeks, Booking ID: 2####</description>
        <quantity>1</quantity>
        <unitPrice>53.00</unitPrice>
      </lineItem>
    </lineItems>
    <customer>
      <id>6##</id>
      <email>###########@centurylink.net</email>
    </customer>
    <billTo>
      <firstName>#####</firstName>
      <lastName>######</lastName>
      <address>### ########### Road Apartment, suite, unit etc. (optional)</address>
      <city>###########</city>
      <state>PA</state>
      <zip>17307</zip>
      <country>USA</country>
      <phoneNumber>###-###-####</phoneNumber>
    </billTo>
    <shipTo>
      <firstName>#####</firstName>
      <lastName>######</lastName>
      <address>### ########### Road Apartment, suite, unit etc. (optional)</address>
      <city>###########</city>
      <state>PA</state>
      <zip>17307</zip>
      <country>USA</country>
    </shipTo>
    <customerIP>##.###.##.###</customerIP>
    <transactionSettings>
      <setting>
        <settingName>duplicateWindow</settingName>
        <settingValue>0</settingValue>
      </setting>
    </transactionSettings>
  </transactionRequest>
</createTransactionRequest>

duration: 0.40078s
02-24-2016 @ 15:11:58 - Response
code: 200
message: OK
headers: Array
(
    [cache-control] => private
    [content-length] => 803
    [content-type] => application/xml; charset=utf-8
    [server] => Microsoft-IIS/7.5
    [x-aspnet-version] => 2.0.50727
    [x-powered-by] => ASP.NET
    [access-control-allow-origin] => *
    [access-control-allow-methods] => PUT,OPTIONS,POST,GET
    [access-control-allow-headers] => x-requested-with,cache-control,content-type,origin,method,SOAPAction
    [date] => Wed, 24 Feb 2016 20:11:57 GMT
    [connection] => close
)

body: <?xml version="1.0" encoding="utf-8"?>
<createTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <refId>2####</refId>
  <messages>
    <resultCode>Error</resultCode>
    <message>
      <code>E00027</code>
      <text>The transaction was unsuccessful.</text>
    </message>
  </messages>
  <transactionResponse>
    <responseCode>3</responseCode>
    <authCode/>
    <avsResultCode>P</avsResultCode>
    <cvvResultCode/>
    <cavvResultCode/>
    <transId>0</transId>
    <refTransID/>
    <transHash>E6400A064AF9B08F18BC6A553C0008D1</transHash>
    <testRequest>0</testRequest>
    <accountNumber/>
    <accountType/>
    <errors>
      <error>
        <errorCode>270</errorCode>
        <errorText>Line item 1 is invalid.</errorText>
      </error>
    </errors>
  </transactionResponse>
</createTransactionResponse>

02-24-2016 @ 15:12:00 - Status code E00027: The transaction was unsuccessful. Error Code: 270 - Line item 1 is invalid. Error Code: 270 - Line item 1 is invalid.
otherjohn
Member
1 REPLY 1

 

Hi otherjohn,

It is hard to tell for sure with some of the information being redacted in your post. One common reason of this error 270 is if you are passing more than the 31 character limit in the item name as explained here. I suggest that you check this field and make sure you are not passing more than the character limit.

 

Thanks,

Joy

Joy
Administrator Administrator
Administrator