Customizing API payment (Authorize.net) plugin

  • Posts: 23
  • Thank you received: 2
  • Hikashop Business
5 years 11 months ago #301260

-- HikaShop version -- : 4.0.1

I am using a payment gateway that does not have a plugin for HikaShop. They do, however, use the same sort of credentials as Authorize.net and have directions to modify the settings needed for Authorize.net to work with their system. I have used the Authorize.net API plugin and entered the credentials they need to make it work for their system with the exception of one thing: the return URL.

I have been on the phone for a few hours with the payment gateway (NMI) troubleshooting this issue. After a successful payment processing, you are brought to a page that gives you the option to print your receipt or "click CONTINUE to finish the transaction". The problem is there is no CONTINUE button! The gateway help said this is simply a link back to the website. There is a place in the Authorize.net plugin to add a return URL but for some reason that information is not being brought over to NMI. They are saying that information just isn't coming through like the rest of the information.

Why am I on the forums to check this? Because the Authorize.net plugin seems to have a bug. When I first set up the plugin to connect to NMI, I entered DEMO credentials to test the system. When I changed those credentials to the real thing, the DEMO credentials kept coming through along WITH the real credentials. It couldn't let go. I had to start a new API and start with the real credentials to get past that glitch.

I can't have shoppers think there is one more step that they are not completing. The sale works, the payment is taken, but they are left thinking there is more to do.

Is there an update to the Authorize.net API plugin or some way we can look into this issue?

Thanks.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 11 months ago #301265

Hi,

The Authorize.net payment plugin does send a URL with the "x_relay_url" parameter of the Authorize.net payment plugin. That parameter is fetched by Authorize.net and then its content is displayed to the user and there the user will have a link to the return URL you entered in the setting of the payment method.

So I don't know how the NMI emulation of Authorize.net works but all I can think of is that they are doing something different than what I describe above.
All I can say is that the Authorize.net payment's return URL parameter works fine with Authorize.net and with many other Authorize.net emulation payment gateways as was reported by other users of HikaShop through the years, and we didn't touch the plugin for ages so there is no reason it wouldn't work anymore, especially with all the merchants already actively using an up to date version of HikaShop and Authorize.net as their payment gateway.

The following user(s) said Thank You: Stogilon

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

  • Posts: 23
  • Thank you received: 2
  • Hikashop Business
5 years 11 months ago #301522

Nicholas, it looks like I need to modify the Authorize.net API to work with NMI. They apparently are missing the "x_relay_url" parameter and are looking for it to be "url_finish" (or "x_url_finish") but I don't know where in the code to change that. I also am not sure which file that code is in. It seems like a simple change that I can do, I just want to make sure I replace the right code.

I did want to note that all the parameters that the API sends out begin with "x_" and all the parameters that NMI uses do not start with "x_". Is it safe to assume that x_ is simply a prefix for all the parameters? I do see that all the other fields do appear to be passed over correctly to NMI.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 11 months ago #301526

Hi,

The x_relay_url parameter is added with the line:

$vars["x_relay_url"] = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=authorize&tmpl=component&lang='.$this->locale.$this->url_itemid;
in the file plugins/hikashoppayment/authorize/authorize.php
So you could try changing it to:
$vars["url_finish"] = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=authorize&tmpl=component&lang='.$this->locale.$this->url_itemid;
or:
$vars["x_url_finish"] = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=authorize&tmpl=component&lang='.$this->locale.$this->url_itemid;

If the other parameters are ok, then you shouldn't change anything else.

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

  • Posts: 23
  • Thank you received: 2
  • Hikashop Business
5 years 11 months ago #301577

That did the trick Nicolas! "url_finish" worked as opposed to "x_url_finish"

The return URL button did not actually show up, but I was able to add some basic html to the thank you message to make it a link back to the site. Not perfect or pretty but it works.

Thanks again Nicolas.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum