How to redirect user back to their order page

  • Posts: 73
  • Thank you received: 0
13 years 3 months ago #4912

I've been wanting to start this thread for some time now and it is one issue that is keeping me from going live until I fix it. The redirect URL is not working. I have entered www.heatmisersaves.com/my-orders as my return URL in the Authorize.net plugin. The help topic says, "Return url : The url you want your users to be redirected to when they finish their payment on the Authorize.net interface. By default, they will be redirected to the after_end page of the checkout process which will thank them for their order."

The HikaShop Configuration help topic for checkout flow says, "The end view always have to be on the last step ALONE."

What is the "after_end" page of the checkout process?

My test users are not getting re-directed as stated in the Return URL help statement and the link from the Authorize.net thank you page returns an error page.

I've noticed there is some configuration on the Authorize.net account. Does the HikaShop plugin over-ride Authorize.net settings?

(Is it normal to be up to 56 test orders while configuring HikaShop and Authorise.net? I've been at this for days) :(

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

  • Posts: 81625
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #4913

Could you give more details ? You say that the thank you page returns an error. What is the error ? What is the link on that page ?

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

  • Posts: 73
  • Thank you received: 0
13 years 3 months ago #4936

After the user submits payment on the Authorize.net payment page the folowing message is displayed:


That is all that is on the page. The link returns an error:
The following errors have occurred.
(13) The merchant login ID or password is invalid or the account is inactive.


But of course my account is active. Notice the href for the return link is empty in the page source below.
Here is the source:
<div class="hikashop_authorize_thankyou" id="hikashop_authorize_thankyou">
	<span id="hikashop_authorize_thankyou_message" class="hikashop_authorize_thankyou_message">
		Thank you for your purchase.<br/><a href="">You can go back to the shop by clicking on this link</a>	</span>
</div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr">

<head>

  <base href="http://www.heatmisersaves.com/index.php" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />

  <meta name="robots" content="index, follow" />
  <meta name="keywords" content="y_key=8630ca965f79c29f" />
  <meta name="description" content="Home of the HeatMiser�?� Energy Saving Furnace Controller with Adaptive Cycle Management - reduce heating cost - conserve natural gas - conserve fossil fuels - reduce emissions" />
  <meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />
  <title>HeatMisersaves.com Home of the HeatMiser�?�</title>
  <link href="/templates/cloudbase/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  <link rel="stylesheet" href="/media/com_hikashop/css/frontend_default.css" type="text/css" />
  <link rel="stylesheet" href="/media/system/css/modal.css" type="text/css" />

  <link rel="stylesheet" href="http://www.heatmisersaves.com/components/com_k2/css/k2.css" type="text/css" />
  <script type="text/javascript" src="/media/com_hikashop/js/hikashop.js"></script>
  <script type="text/javascript" src="/media/system/js/mootools.js"></script>
  <script type="text/javascript" src="/media/system/js/modal.js"></script>
  <script type="text/javascript" src="http://www.heatmisersaves.com/components/com_k2/js/k2.js"></script>
  <script type="text/javascript">

		do_nothing( function() {

			SqueezeBox.initialize({});

			$$('a.modal').each(function(el) {
				el.addEvent('click', function(e) {
					new Event(e).stop();
					SqueezeBox.fromElement(el);
				});
			});
		});
var K2RatingURL = 'http://www.heatmisersaves.com/';
  </script>

<link rel="stylesheet" href="http://www.heatmisersaves.com/templates/cloudbase/css/addons.css" type="text/css" />
<link rel="stylesheet" href="http://www.heatmisersaves.com/templates/cloudbase/css/template.css" type="text/css" />
<link rel="stylesheet" href="http://www.heatmisersaves.com/templates/cloudbase/css/print.css" type="text/css" />

	

			<script type="text/javascript">
			var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
			document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
			</script>
			<script type="text/javascript">
			try {
			var pageTracker = _gat._getTracker("UA-20461873-1");
			pageTracker._trackPageview();
			} catch(err) {}</script>
			</head>

<body class="contentpane">

<div class="column">

	
	
</div>

</body>

</html>

I would like the user to be redirected to www.heatmisersaves.com/my-orders automatically

Thank you,
Bill

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

  • Posts: 81625
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #4938

What did you put in the "return URL" option of the payment plugin ?
It should be www.heatmisersaves.com/my-orders

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

  • Posts: 73
  • Thank you received: 0
13 years 3 months ago #4941

Yes it is. I just double checked.

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

  • Posts: 81625
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #4943

I have a look at the code and found a possible problem.
Could you replace the code:

$return_url = $method->payment_params->return_url;
by
$return_url = $element->payment_params->return_url;
in the file plugins/hikashoppayment/authorize.php
and try again ?

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

  • Posts: 73
  • Thank you received: 0
13 years 3 months ago #4951

Ok,

That did fix the link but it doesn't automatically redirect after the purchase. Is that normal?

-Bill

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

  • Posts: 81625
  • Thank you received: 13085
  • MODERATOR
13 years 3 months ago #4953

Yes. That's the normal behavior. If you want it to redirect, you can add the code below to the end of the file plugins/hikashoppayment/authorize_thankyou.php

<?php
$doc =& JFactory::getDocument();
$doc->addScriptDeclaration("do_nothing( function() {window.location='".$return_url."'});");

Then, you should copy that file in the folder templates/YOUR_TEMPLATE/hikashoppayment so that you will still have that modification after your update.

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

  • Posts: 73
  • Thank you received: 0
13 years 3 months ago #4955

Result!!!!

It works great now. Thank you!!!

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

Time to create page: 0.071 seconds
Powered by Kunena Forum