- Posts: 38
- Thank you received: 0
authorize.net AIM description field
Thanks for your help.
Please Log in or Create an account to join the conversation.
$vars["x_line_item"][]=substr($product->order_product_code,0,30).'<|>'.substr(strip_tags($product->order_product_name),0,30).'<|><|>'.$product->order_product_quantity.'<|>'.round($product->order_product_price,(int)$currency->currency_locale).'<|>'.$has_tax;
in the file plugins/hikashoppayment/authorize.php
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
========= 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 :
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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->order_product_code.', Product Name: '.$product->order_product_name.', Quantity: '.$product->order_product_quantity.', Price: '.round($product->order_product_price,(int)$currency->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:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 78
- Thank you received: 1
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 or Create an account to join the conversation.
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:
Modified code:
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.