Authorize.net (AIM) order number & description

  • Posts: 29
  • Thank you received: 0
11 years 2 months ago #120938

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #121030

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.

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.

  • Posts: 29
  • Thank you received: 0
11 years 2 months ago #121107

Hi Jerome,

In the past what we have seen show up on the Merchant Email Receipt is this:

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
11 years 2 months ago #121273

You can edit the file plugins/hikashoppayment/authorize/authorize_end.php and add the code below at the beginning:

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

  • Posts: 29
  • Thank you received: 0
11 years 2 months ago #121777

I will give this a try on a test machine.

Thanks.

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

  • Posts: 29
  • Thank you received: 0
11 years 2 months ago #121800

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,

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #121820

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.

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.
Last edit: 11 years 2 months ago by Jerome.

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

  • Posts: 29
  • Thank you received: 0
11 years 2 months ago #121986

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:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #122040

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.

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.

Time to create page: 0.067 seconds
Powered by Kunena Forum