Skip to main content

Authorize.net (AIM) order number & description

More
13 years 1 month ago #120938 by reddeer
-- url of the page with the problem -- : n/a
-- HikaShop version -- : 2.2.0 soon to be 2.2.1
-- Joomla version -- : 2.5.14
-- PHP version -- : 5.3.18
-- Browser(s) name and version -- : n/a
-- Error-message(debug-mod must be tuned on) -- : n/a

Hi Hikari,

I noticed that other people also have asked for this feature in the past, probably for the same reason we need it, which is that the company accountant needs to see the information on the Authorize.net statement, otherwise she just has an amount and not a number with which to track the purchase. I'm told that tax auditors tend not to like this. B)

Has the capability to send the order id and description been added to the Authorize.net plug-in or must the user still modify plugins/hikashoppayment/authorize.php himself? We have Authorize.net statements generated via previous shopping carts (also using the AIM method) that contain this information, so I can't justify to the accountant why we cannot have this with HikaShop. :(

Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #121030 by Jerome
Hi,

Authorize plugin in AIM mode call the payment platform before the order creation. So the order does not have an order id yet.
It is possible to make a request in the database in order to predict what the order id should be, I guess that could be an interesting function in the Payment plugin interface.

For the description, what do you want to send ?

Regards,

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

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #121107 by reddeer
Hi Jerome,

In the past what we have seen show up on the Merchant Email Receipt is this:
Code:
========= ORDER INFORMATION ========= Invoice : 100001 Description : Product Name Amount : 500.00 (USD) Payment Method : Visa Type : Authorization and Capture

where:
Invoice is actually the order number.
Description: Product Name corresponds to the name of the purchased item.

Thanks.

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #121273 by nicolas
You can edit the file plugins/hikashoppayment/authorize/authorize_end.php and add the code below at the beginning:
Code:
<?php $product = explode('<|>',$this->vars['x_line_item'][0]); $this->vars['x_description'] = $product[1]; $db = JFactory::getDBO(); $db->setQuery('SELECT max(order_id)+1 FROM #__hikashop_order;'); $this->vars['x_invoice_num'] = $db->loadResult(); ?>

Please Log in or Create an account to join the conversation.

More
13 years 4 weeks ago #121777 by reddeer
I will give this a try on a test machine.

Thanks.

Please Log in or Create an account to join the conversation.

More
13 years 4 weeks ago #121800 by reddeer
I placed the code at the beginning as shown below, but no order number appeared in the statement. Did you really mean to place the code at the beginning where I put it or should I have placed the code later in the file? If this is wrong, maybe you could specify the code block before which I should have placed the new code.

Thanks,
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.2.0 * @author hikashop.com * @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?> <?php $product = explode('<|>',$this->vars['x_line_item'][0]); $this->vars['x_description'] = $product[1]; $db = JFactory::getDBO(); $db->setQuery('SELECT max(order_id)+1 FROM #__hikashop_order;'); $this->vars['x_invoice_num'] = $db->loadResult(); ?> <?php if ($this->payment_params->api == 'dpm' && @$this->payment_params->iframe){ $url=urlencode(base64_encode(serialize($this->vars))); ?> <iframe name="frame" scrolling="auto" height="1000" width="660" Frameborder="no" src="<?php echo $vars["x_relay_url"].'&iframe='.$url;?>"></iframe>

Please Log in or Create an account to join the conversation.

More
13 years 4 weeks ago - 13 years 4 weeks ago #121820 by Jerome
Hi,

The place in the file is the good one.
And the code looks good too.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Last edit: 13 years 4 weeks ago by Jerome.

Please Log in or Create an account to join the conversation.

More
13 years 3 weeks ago #121986 by reddeer
Well, it's good that I put the code in the correct place, but I still do not see an order number in the Authorize.net merchant receipt. Is there something else that needs to be done to make the order number show up?

Thanks.

This is what I get:
Code:
========= GENERAL INFORMATION ========= Merchant : My Test Account (xxxxxx) Date/Time : 4-Sep-2013 9:09:02 PDT ========= ORDER INFORMATION ========= Invoice : Description : Amount : 100.00 (USD) Payment Method : Visa Type : Authorization and Capture

Please Log in or Create an account to join the conversation.

More
13 years 3 weeks ago #122040 by Jerome
Hi,

www.authorize.net/support/AIM_guide.pdf
I don't see any other variables for the invoice number of the description.

Regards,

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.218 seconds
Powered by Kunena Forum