close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

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 | 3258 views | 6 replies |

bec341098

Line Item 1 is Invalid...help!

Hi Forums,

I have read ALL the threads pertaining to this, and nothing has helped. Authorize.net say it's not their issue, so I am hoping that someone can shed some light on this.

So, intermittently, checkout is throwing this error, and here is what I get (certain info blanked out, obviously):


Your transaction could not be completed.

(TESTMODE) Line item 1 is invalid.

Response Code: 3
Response Subcode: 1
Reponse Reason Code: 270

Full Request:

x_login=XXXXXXX&x_tran_key=XXXXXXXXX_version=3.1&x_invoice_num=991e61002b374db60e5698cac9f64aee&x_test_request=TRUE&x_method=CC&x_type=AUTH_CAPTURE&x_relay_response=FALSE&x_delim_data=TRUE&x_delim_char=::&x_customer_ip=76.1.191.114&x_amount=3000.00&x_description=1 Sterling & 18K Earrings (C4-HE255), 1 Mercy Pearl Necklace (E4-4205YTU)&x_line_item=C4-HE255<|>1<|>550<|>YES&x_line_item=E4-4205YTU<|>1<|>2450<|>YES&x_card_num=XXXXXXXXXXXXXXXX&x_exp_date=1010&x_card_code=263&x_email_customer=TRUE&x_tax_exempt=FALSE&x_first_name=Bec&x_last_name=XXXX&x_address=XXXXX&x_city=XXXXXXXX&x_state=FL&x_zip=33931&x_phone=XXXXXXXXXX&x_fax=&x_email=rew@rewilson.us&x_country=&x_ship_to_first_name=Bec&x_ship_to_last_name=XXXXX&x_ship_to_address=XXXXX&x_ship_to_city=XXXXX&x_ship_to_state=FL&x_ship_to_zip=33931&x_ship_to_country=&x_ship_to_phone=XXXXXXXXXX&x_ship_to_fax=&x_recurring_billing=NO

Help? Thanks.
Bec

Sign in to reply to this post

Jason ByrnesWebAssist

It looks to me like you have removed some of the parameters that are sent to Authorize.net.


In the XML you send, the line item is sent to authorize.net as:
x_line_item=C4-HE255<|>1<|>550<|>YES


this looks like it correlates to:
id<|>quantity<|>price<|>taxable

the string they expect is:
id<|>name<|>description<|>quantity<|>price<|>taxable


you have removed the name and description elements from the local checkout server behavior.

Sign in to reply to this post

bec341098

Hi Jason,

Thanks. I tried to fix that, and got the same error. Here is what my line items look like now:

x_line_item=A2-13377<|>Sanibel Island Story Bead<|>

Sterling Silver Sanibel Island Story Bead. Compatible with most major brand bead bracelets.

<|>1<|>45<|>YES&x_line_item=K3-1934SBSSBR<|>Sand Dollar Bracelet<|>

Sterling Silver Sand Dollar Bracelet - 7 3/4 inches

I also tried stripping the HTML from the description, but got the same thing:

x_line_item=A2-13377<|>Sanibel Island Story Bead<|>Sterling Silver Sanibel Island Story Bead. Compatible with most major brand bead bracelets.<|>1<|>45<|>YES&x_line_item=K3-1934SBSSBR<|>Sand Dollar Bracelet<|>Sterling Silver Sand Dollar Bracelet - 7 3/4 inches<|>1<|>115<|>YES&

Help??

Sign in to reply to this post

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.

Sign in to reply to this post

bec341098

Hi Jason,

I figured out that yes, it is special characters that is squirreling everything. But I couldn't find it, as it was a double-space! Crazyness. So yes, I am going to try to strip the code from the description and possibly the name, and see where that gets us.

So, I hope this helps someone else: If you use iRite, it WILL insert a special character if you double-space!

Thanks so much for your help, I hope I don't have to ask you how to strip them!
Bec

Sign in to reply to this post

Jason ByrnesWebAssist

Excellent, glad to hear you found the culprit.

Sign in to reply to this post

bec341098

Jason rules....

It worked! Thanks so much, and happy holidays!
Bec

Sign in to reply to this post

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...