[Skip to main content](#vessel-content)

#   authorize.net AIM description field

##

- **[mrdan](/forum/user/3459-mrdan "View mrdan's Profile")**
- [![mrdan's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3459-mrdan "View mrdan's Profile") Topic Author
- [ Offline](/forum/user/3459-mrdan)

Less More

- Posts: 38
- Thank you received: 0
-
-

15 years 2 months ago [\#24453](#24453) by [mrdan](/forum/user/3459-mrdan "View mrdan's Profile")  *[authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#24453 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")* was created by *[mrdan](/forum/user/3459-mrdan "View mrdan's Profile")*

I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?

Thanks for your help.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

15 years 2 months ago [\#24455](#24455) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#24455 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")*

The product code is already sent to authorize.net for each product. If you want to add the product description to the product name, you need to do that by changing the line
$vars["x_line_item"][]=substr($product-&gt;order_product_code,0,30).'&lt;&#124;&gt;'.substr(strip_tags($product-&gt;order_product_name),0,30).'&lt;&#124;&gt;&lt;&#124;&gt;'.$product-&gt;order_product_quantity.'&lt;&#124;&gt;'.round($product-&gt;order_product_price,(int)$currency-&gt;currency_locale).'&lt;&#124;&gt;'.$has_tax;
in the file plugins/hikashoppayment/authorize.php

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mrdan](/forum/user/3459-mrdan "View mrdan's Profile")**
- [![mrdan's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3459-mrdan "View mrdan's Profile") Topic Author
- [ Offline](/forum/user/3459-mrdan)

Less More

- Posts: 38
- Thank you received: 0
-
-

15 years 2 months ago [\#24464](#24464) by [mrdan](/forum/user/3459-mrdan "View mrdan's Profile")  Replied by *[mrdan](/forum/user/3459-mrdan "View mrdan's Profile")* on topic *[Re: authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#24464 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")*

Thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mrdan](/forum/user/3459-mrdan "View mrdan's Profile")**
- [![mrdan's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3459-mrdan "View mrdan's Profile") Topic Author
- [ Offline](/forum/user/3459-mrdan)

Less More

- Posts: 38
- Thank you received: 0
-
-

15 years 2 months ago -  15 years 2 months ago [\#24466](#24466) by [mrdan](/forum/user/3459-mrdan "View mrdan's Profile")  Replied by *[mrdan](/forum/user/3459-mrdan "View mrdan's Profile")* on topic *[Re: authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#24466 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")*

We're not getting product code or any product info about the order in our auth.net receipt (I have not made any changes to the authorize.php file). We just get this:
========= GENERAL INFORMATION =========

Merchant : ABC (12345)
Date/Time : 23-Aug-2011 06:46:37 AM

========= ORDER INFORMATION =========
Invoice :
Description :
Amount : 42.00 (USD)
Payment Method : MasterCard
Type : Authorization and Capture

============== RESULTS ==============
Response : This transaction has been approved.
Authorization Code : 012345
Transaction ID : 1234567
Address Verification : Street Address: Match -- First 5 Digits of Zip: Match

==== CUSTOMER BILLING INFORMATION ===
Customer ID :
First Name : John
Last Name : Smith
Company :
Address : 123 Main St.
City : New York
State/Province : New York
Zip/Postal Code : 22222
Country : United States of America
Phone : 555-1212
Fax :
E-Mail : xxx@yyyyy.com

==== CUSTOMER SHIPPING INFORMATION ===
First Name : John
Last Name : Smith
Company :
Address : 123 Main St.
City : New York
State/Province : New York
Zip/Postal Code : 22222
Country : United States of America

======= ADDITIONAL INFORMATION ======
Tax :
Duty :
Freight :
Tax Exempt : Yes
PO Number :

Last edit: 15 years 2 months ago by [mrdan](/forum/user/3459-mrdan "View mrdan's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

15 years 2 months ago [\#24478](#24478) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#24478 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")*

That means that authorize.net doesn't use the detailed information sent by HikaShop. Not much we or you can do in HikaShop unfortunately...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mrdan](/forum/user/3459-mrdan "View mrdan's Profile")**
- [![mrdan's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3459-mrdan "View mrdan's Profile") Topic Author
- [ Offline](/forum/user/3459-mrdan)

Less More

- Posts: 38
- Thank you received: 0
-
-

15 years 2 months ago -  13 years 1 month ago [\#24740](#24740) by [mrdan](/forum/user/3459-mrdan "View mrdan's Profile")  Replied by *[mrdan](/forum/user/3459-mrdan "View mrdan's Profile")* on topic *[Re: authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#24740 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")*

ok.
I found this info from authorize.net site about the x_line_item array:
Based on their respective business requirements, merchants can choose to submit itemized order information with a transaction. Itemized order information is not submitted to the processor and is not currently returned with the transaction response. This information is displayed on the Transaction Detail page and in QuickBooks download file reports in the Merchant Interface.

So I decided to add code to get the x_description field to show order info to the authorize.php file:
Added this line: $vars["x_description"]=""; before the loop
Then added this line after $vars["x_line_item"]...:
$vars["x_description"]=$vars["x_description"].'Product Code: '.$product-&gt;order_product_code.', Product Name: '.$product-&gt;order_product_name.', Quantity: '.$product-&gt;order_product_quantity.', Price: '.round($product-&gt;order_product_price,(int)$currency-&gt;currency_locale).'\r\n';

This code adds product order info to the authorize.net receipt by filling the x_description field. However, the Product Code is not coming through, but rather, the product code is the same as the product name. Is there something I'm doing wrong?

Full code snippet below:
Code:

$vars["x_description"]=""; $vars["x_line_item"]=array(); foreach($order-&gt;cart-&gt;products as $product){ if(bccomp($product-&gt;order_product_tax,0,5)){ $tax+=$product-&gt;order_product_quantity*round($product-&gt;order_product_tax,(int)$currency-&gt;currency_locale['int_frac_digits']); $has_tax = 'TRUE'; }else{ $has_tax = 'FALSE'; } $vars["x_line_item"][]=substr($product-&gt;order_product_code,0,30).'&lt;&#124;&gt;'.substr(strip_tags($product-&gt;order_product_name),0,30).'&lt;&#124;&gt;&lt;&#124;&gt;'.$product-&gt;order_product_quantity.'&lt;&#124;&gt;'.round($product-&gt;order_product_price,(int)$currency-&gt;currency_locale['int_frac_digits']).'&lt;&#124;&gt;'.$has_tax; $vars["x_description"]=$vars["x_description"].'Course Number: '.$product-&gt;order_product_code.', Course Name: '.$product-&gt;order_product_name.', How many signups: '.$product-&gt;order_product_quantity.', Price: '.round($product-&gt;order_product_price,(int)$currency-&gt;currency_locale['int_frac_digits']).'\r\n'; }

Last edit: 13 years 1 month ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

15 years 2 months ago [\#24747](#24747) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#24747 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")*

Your code is good. I don't see why you wouldn't get the product code in the x_description variable.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mrdan](/forum/user/3459-mrdan "View mrdan's Profile")**
- [![mrdan's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3459-mrdan "View mrdan's Profile") Topic Author
- [ Offline](/forum/user/3459-mrdan)

Less More

- Posts: 38
- Thank you received: 0
-
-

15 years 2 months ago [\#24852](#24852) by [mrdan](/forum/user/3459-mrdan "View mrdan's Profile")  Replied by *[mrdan](/forum/user/3459-mrdan "View mrdan's Profile")* on topic *[Re: authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#24852 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")*

Ok. I checked and yes it is working. Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Gonzales](/forum/user/3882-gonzales "View Gonzales's Profile")**
- [![Gonzales's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3882-gonzales "View Gonzales's Profile")
- [ Offline](/forum/user/3882-gonzales)

Less More

- Posts: 5
- Thank you received: 0
-
-

15 years 1 month ago [\#25405](#25405) by [Gonzales](/forum/user/3882-gonzales "View Gonzales's Profile")  Replied by *[Gonzales](/forum/user/3882-gonzales "View Gonzales's Profile")* on topic *[Re: authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#25405 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")*

I checked this code,it really works great...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[adeptdesigns](/forum/user/4465-adeptdesigns "View adeptdesigns's Profile")**
- [![adeptdesigns's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4465-adeptdesigns "View adeptdesigns's Profile")
- [ Offline](/forum/user/4465-adeptdesigns)

Less More

- Posts: 78
- Thank you received: 1
-
-

13 years 1 month ago [\#124335](#124335) by [adeptdesigns](/forum/user/4465-adeptdesigns "View adeptdesigns's Profile")  Replied by *[adeptdesigns](/forum/user/4465-adeptdesigns "View adeptdesigns's Profile")* on topic *[Re: authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#124335 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")*

Same problem for me, details not supplied on Merchant Email Receipt. Authorize.net says:

If you need the Description details listed in the Merchant Email Receipt, your web developer will need to adjust your website/shopping cart so that Itemized Order Information is no longer being used.

I am trying to implement code from mrdan, he says:

> Added this line: $vars\["x\_description"\]=""; before the loop

Where is the loop? Where is this placed?

And...

> Then added this line after $vars\["x\_line\_item"\]...:

There are 4 of "$vars["x_line_item"]" Which one do I do this after?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

13 years 1 month ago [\#124401](#124401) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Re: authorize.net AIM description field](/forum/2-general-talk-about-hikashop/24453-authorize-net-aim-description-field#124401 "I would like the description field in the authorize.net transaction populated with the product description or product item number. How can I do this?  Thanks for your help.")*

Hi,

I update the mrdan's post in order to put the "full code" between "code" tags.
With the new version of the plugin (which has changed during these 2 years). It will be

Current code: Code:

$i = 1; $tax = 0; $vars["x_line_item"]=array(); $config =&amp; hikashop_config(); $group = $config-&gt;get('group_options',0); foreach($order-&gt;cart-&gt;products as $product){ if($group &amp;&amp; $product-&gt;order_product_option_parent_id) continue; if(bccomp($product-&gt;order_product_tax,0,5)){ $tax+=$product-&gt;order_product_quantity*round($product-&gt;order_product_tax,(int)$this-&gt;currency-&gt;currency_locale['int_frac_digits']); $has_tax = 'TRUE'; }else{ $has_tax = 'FALSE'; } $vars["x_line_item"][]=substr($product-&gt;order_product_code,0,30).'&lt;&#124;&gt;'.substr(strip_tags($product-&gt;order_product_name),0,30).'&lt;&#124;&gt;&lt;&#124;&gt;'.$product-&gt;order_product_quantity.'&lt;&#124;&gt;'.round($product-&gt;order_product_price,(int)$this-&gt;currency-&gt;currency_locale['int_frac_digits']).'&lt;&#124;&gt;'.$has_tax; }

Modified code: Code:

$i = 1; $tax = 0; $vars["x_description"]=""; $vars["x_line_item"]=array(); $config =&amp; hikashop_config(); $group = $config-&gt;get('group_options',0); foreach($order-&gt;cart-&gt;products as $product){ if($group &amp;&amp; $product-&gt;order_product_option_parent_id) continue; if(bccomp($product-&gt;order_product_tax,0,5)){ $tax+=$product-&gt;order_product_quantity*round($product-&gt;order_product_tax,(int)$this-&gt;currency-&gt;currency_locale['int_frac_digits']); $has_tax = 'TRUE'; }else{ $has_tax = 'FALSE'; } $vars["x_line_item"][]=substr($product-&gt;order_product_code,0,30).'&lt;&#124;&gt;'.substr(strip_tags($product-&gt;order_product_name),0,30).'&lt;&#124;&gt;&lt;&#124;&gt;'.$product-&gt;order_product_quantity.'&lt;&#124;&gt;'.round($product-&gt;order_product_price,(int)$this-&gt;currency-&gt;currency_locale['int_frac_digits']).'&lt;&#124;&gt;'.$has_tax; $vars["x_description"] .= 'Course Number: '.$product-&gt;order_product_code.', Course Name: '.$product-&gt;order_product_name.', How many signups: '.$product-&gt;order_product_quantity.', Price: '.round($product-&gt;order_product_price,(int)$currency-&gt;currency_locale['int_frac_digits']).'\r\n'; }

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [adeptdesigns](/forum/user/4465-adeptdesigns "View adeptdesigns's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzI0NDUzLWF1dGhvcml6ZS1uZXQtYWltLWRlc2NyaXB0aW9uLWZpZWxkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.106 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
