View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Line Item 1 is Invalid...help!

Thread began 12/17/2009 4:49 pm by bec341098 | Last modified 12/18/2009 3:10 pm by bec341098 | 2905 views | 6 replies

Jason ByrnesWebAssist

The description being sent may be causing the error. In the authorize.net code, change the description to a static value:

php:
$AuthNet_itemized[0][1] = "x_description";

$AuthNet_itemized[1][1] = "Jewelry Store Order";





None of the values passed to Authorize.net can contain any HTML so you will need to strip them from the description, also make sure there is no HTML in the other columns.

The line item 1 error means that invalid information is being sent in the order description. Here is the authorize.net API guide. page 20 - 21 talks about the line item requirements:
AIM_guide.pdf

The code for bulding up the line item will look like:

php:
while ( !$eCart1->EOF() )      {

  $nextIndex = count($AuthNet_itemized[0]);
  $AuthNet_itemized[0][$nextIndex] = "ID";
  $AuthNet_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("ID")  ."";
  $nextIndex = count($AuthNet_itemized[0]);
  $AuthNet_itemized[0][$nextIndex] = "Name";
  $AuthNet_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("Name")  ."";
  $nextIndex = count($AuthNet_itemized[0]);
  $AuthNet_itemized[0][$nextIndex] = "Description";
  $AuthNet_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("Description")  ."";
  $nextIndex = count($AuthNet_itemized[0]);
  $AuthNet_itemized[0][$nextIndex] = "Quantity";
  $AuthNet_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("Quantity")  ."";
  $nextIndex = count($AuthNet_itemized[0]);
  $AuthNet_itemized[0][$nextIndex] = "Price";
  $AuthNet_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("Price")  ."";
  $nextIndex = count($AuthNet_itemized[0]);
  $AuthNet_itemized[0][$nextIndex] = "Taxable";
  $AuthNet_itemized[1][$nextIndex] = "YES";

    $eCart1->MoveNext();
    $cartIndex ++;
  }



This code is basedf on a cart named eCart1, your will be slightly different. To pinpoint where the problem is, one at a time, hard code the values. for example, change:

php:
$AuthNet_itemized[0][$nextIndex] = "ID";

$AuthNet_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("ID")  ."";




to:

php:
$AuthNet_itemized[0][$nextIndex] = "ID";

$AuthNet_itemized[1][$nextIndex] = "item1";



then test again. If you still get the same error, change:

php:
$AuthNet_itemized[0][$nextIndex] = "Name";

$AuthNet_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("Name")  ."";



to:

php:
$AuthNet_itemized[0][$nextIndex] = "Name";

$AuthNet_itemized[1][$nextIndex] = "item name";




and test again. then change the description and so on till you find the culprit.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...