Nicholas,
First I commended out the following code in that file as follows:
<?php if(!empty($this->payment_params->return_url)){ ?>
<?php /* commenting out this section as per Nicolas at HikaShop to see if we can get an automatic return from Authorize.net
<!--[if IE]>
<script type="text/javascript">
window.location='<?php echo $this->payment_params->return_url; ?>';
</script>
<![endif]--> */ ?>
<?php } ?>
Then I just completely removed it with and without the 'if' statement as follows:
<?php if(!empty($this->payment_params->return_url)){ ?>
<?php } ?>
No luck! I get pretty much the same type of responses in testing. If I have the "h t t p s://www.divorcetoolbox.net/thank-you-for-your-purchase" URL in the Authorize.net Default Relay Response URL and/or even the Default Receipt URL, I get this error whether or not I have the same URL in the Hikashop Authorize payment plugin 'Return url'.
The following errors have occurred.
(14) The referrer, relay response or receipt link URL is invalid.
If I have NO URL in the Authorize.net settings, I get the page to click to return back to the website.
Thank you for your purchase. Please click below to get access to the programs.
Go to my account
You can go back to the shop by clicking on this link
When I stop the checkout and check the code, the 'x_relay_url' that Authorize.net is checking is as follows:
<input name="x_relay_url" value="https://www.divorcetoolbox.net/index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=authorize&tmpl=component&lang=en&Itemid=356" type="hidden">
I would have been expecting the "h t t p s://www.divorcetoolbox.net/thank-you-for-your-purchase" to be in that field.
So on a hunch, I decided to put the following link into each of the Authorize.net URL settings (one at a time and tested) so it matched up with the "x_relay_url" settings.
https://www.divorcetoolbox.net/index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=authorize&tmpl=component&lang=en&Itemid=356
I did not get the Error #14 display. It went to the Authorize.net site, I submitted the payment and got the 'return link page' which if I clicked the link, it returned back to the page I wanted it to return which is the setting in the HikaShop Authorize payment plugin. So that procedure didn't work either.
At this point, I couldn't think of a single other way I could have tested this process.
BUT THEN, I had a light bulb go off. I edited the thank you page to just directly do this via HTML and it works!!!!
Here is the code:
<?php
/**
* @package HikaShop for Joomla!
* @version 2.6.3
* @author hikashop.com
* @copyright (C) 2010-2016 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php /* bypassing and putting in automatic return via HTML javascript
<div class="hikashop_authorize_thankyou" id="hikashop_authorize_thankyou">
<span id="hikashop_authorize_thankyou_message" class="hikashop_authorize_thankyou_message">
<?php echo JText::_('THANK_YOU_FOR_PURCHASE');
if(!empty($this->payment_params->return_url)){
echo '<br/><a href="'.$this->payment_params->return_url.'">'.JText::_('GO_BACK_TO_SHOP').'</a>';
}?>
</span>
</div>
<?php if(!empty($this->payment_params->return_url)){ ?>
<!--[if IE]>
<script type="text/javascript">
window.location='<?php echo $this->payment_params->return_url; ?>';
</script>
<![endif]-->
<?php } ?>
*/ ?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Authorize Redirect Page</title>
<meta name="description" content="A page that will redirect the user to the DivorceToolbox.net thank you page after 1 second">
<meta name="author" content="DivorceToolbox.net">
<meta http-equiv="refresh" content="1;URL=https://www.divorcetoolbox.net/thank-you-for-your-purchase">
</head>
<body bgcolor="#ffffff">
<center>If you are not automatically redirected to the thank you page after 3 seconds, please <a href="https://www.divorcetoolbox.net/thank-you-for-your-purchase">CLICK HERE</a></center>
</body>
</html>
Whooppeeeeee!