Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Authorize.Net x_line_item 30 Items Restriction Fix


clustersolutions

Recommended Posts

To say I fight fire it's an understatement...a new B2B site a transaction had failed due to Authorize.net AIM x_line_item 30 items restriction. The vendor was trying to checkout with 31 line items. No kidding...4 grands worth failed because of 1 item over the limit...

 

A quick fix if you run into this...in authorizenet_cc_aim.php file inside payment module...or just comment these lines out if you don't care for them...good luck! Tim

//Authorize.net AIm x_line_item 30 item restriction.
if (sizeof($order->products) < 31) {
      for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
        $post_string .= '&x_line_item=' . urlencode($i+1) . '<|>' . urlencode(substr($order->products[$i]['name'], 0, 31)) . '<|>' . urlencode(substr($order->products[$i]['name'], 0, 255)) . '<|>' . urlencode($order->products[$i]['qty']) . '<|>' . urlencode($this->format_raw($order->products[$i]['final_price'])) . '<|>' . urlencode($order->products[$i]['tax'] > 0 ? 'YES' : 'NO');
      }
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...