- Posts: 86587
- Thank you received: 14326
Finish button on checkout not redirecting
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
So to play around with it a bit I set it to No and saved it. Registered as a new user, paid, and was returned back to my website fine, but of course the user is logged in. Worked as expected.
I set it back to Yes. Registered as a new user, was redirected to Authorize.net payment page, submitted payment, and the Authorize.net thank you page is messed up, there is a script error (I think this is a script error).
Here's a screenshot of the error - Uncaught TypeError: Object (object global) has no method 'addEvent':
So when the Force user logout on group update is set to Yes in the Hikashop group plugin, the thank you page from Authorize.net is messed up but the user is logged out. When I set the Force user logout on group update to No, then the thank you page from Authorize.net is fine and the user is able to be redirected back to the site, but is of course is logged in.
Not sure what is causing the error and the thank you page looking weird. How can I fix this? Since it only happens when the Force user logout on group update is set to Yes, then I am assuming it's tied to the plugin somehow?
Please Log in or Create an account to join the conversation.
That should display an error message at the end of that page which will help us understand what's going on.
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
I am not sure if this is what you meant by turning on debug and error reporting. But I am getting the script error on the thank you page that is displayed after submitting payment with Authorize's payment form. So this is still with Authorize and the URL of secure.authorize.net/gateway/transact.dll , so it's not part of my Joomla site. I don't see any Joomla debug or error reporting for this page. Or am I doing this wrong? Is there another way to debug this error using Joomla's debug and error reporting even though it's on Authorize's page?
I only get the script error on Authorize's thank you page when Force user logout on group update is set to yes in the Hikashop group plugin.
Please Log in or Create an account to join the conversation.
Let's do differently then.
Can you open your server's PHP error log file and look for the latest Fatal error message ? That should be that same error message that should be displayed on that error page.
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
[24-Mar-2014 10:59:17 America/Denver] PHP Notice: Undefined property: stdClass::$order_addresses_fields in /home/public_html/media/com_hikashop/mail/order_creation_notification.text.php on line 78
[24-Mar-2014 10:59:17 America/Denver] PHP Warning: Invalid argument supplied for foreach() in /home/public_html/media/com_hikashop/mail/order_creation_notification.text.php on line 78
[24-Mar-2014 10:59:53 America/Denver] PHP Notice: Undefined variable: order in /home/public_html/plugins/hikashoppayment/authorize/authorize.php on line 417
[24-Mar-2014 10:59:53 America/Denver] PHP Notice: Trying to get property of non-object in /home/public_html/plugins/hikashoppayment/authorize/authorize.php on line 417
[24-Mar-2014 10:59:53 America/Denver] PHP Notice: Undefined index: in /home/public_html/plugins/hikashoppayment/authorize/authorize.php on line 417
Please Log in or Create an account to join the conversation.
Can you change the code:
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
For the user who is already registered but needs to renew membership, they can login to renew their membership and pay with Authorize.net - This works fine and the user is successfully redirect back to my site except that the user is not logged out even though I have Force user logout on group update. Their new group upon renewal of membership is Paid Member with Continuing Education. So they should be logged out to update their acl.
For the user who needs to register then pay with Authorize.net, the user registers, is directed to Authorize, submits payment and the thank you page for Authorize is what I posted earlier where my template is messed up. However with this user, they are in fact logged out at this time and they are put into the correct acl.
So two different users - one already registered and already logged in and pays and is redirected back to my site correctly but they are not logged out and the other is a new user who registers and is not correctly redirected back to my site but is logged out.
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
Please Log in or Create an account to join the conversation.
For the fact that the user is not logged out, the only explanation I can see is that the user either is already in the correct group, or is a super admin and in that case we don't log him out as he already has enough rights.
For the fact that you get an error on authorize.net I would have guessed at a fatal error, but in that case you should see it in the log. So I'm a bit puzzled. Could you try maybe to change the "session handler" option of the joomla configuration. Maybe that would help avoid the issue.
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
How about this, I use to have code in the end file of the view checkout that would log out the user. That was what started this whole thread because after updating, that code in that file didn't work any more and just redirected the user to the home page and not to the payment page. If I turn off the Force user to logout on group update, then add code somewhere to some file to log out the user maybe that would work? What code could I use and where would I put it?
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
If I have the Force user logout on group update set to yes, then the user is directed back to the home page and is logged out. But they do not get a thank you page so it is kinda weird and the user will not realize their payment was processed successfully.
Please tell me how to force the redirection after purchase to the default thank you page or any URL that I put into the Return URL field in the Authorize.net payment plugin.
I response will be greatly appreciated as I would like to get this working correctly.
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
Please Log in or Create an account to join the conversation.
With the authorize payment method the customer should be redirect to the thank you page of the plugin.
plugins/hikashoppayment/authorize/authorize_thankyou.php".
Thanks to try to see if this is displayed by using custom code inside.
If it's the displayed page, so you can add a php redirect in order to reach the desired page.
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
Could you please be more specific. I am not sure what custom code I need add to that file to see if I can get a thank you page to display. I googled how to do a php redirect and tried to put this:
<?php
/* Redirect browser */
header("Location: theos.in/ ");
/* Make sure that code below does not get executed when we redirect. */
exit;
?>
at the beginning of the file authorize_thankyou.php but that did not work.
Please let me know what custom code to add to that file to try to do a redirect to auto.com/index.php/registrationredirect
Thank you.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
The solution will probably be to use that kind of custom code :
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
What else to try?
Please Log in or Create an account to join the conversation.
- dbarnhart863
-
Topic Author
- Offline
- Posts: 54
- Thank you received: 3
Since I have switched to using the AIM method of authorize, I added the code to force the user to log out after checkout. I put
<?php
$this->after_end();
$app = JFactory::getApplication();
$app->logout( $this->order->customer->user_cms_id );
?>
in the file after_end in the view checkout.
I kept the Force user logout on group update to No under the Hikashop group plugin. I am using the default Hikashop thank you page so there is not a redirect URL in my Authorize.net plugin.
Now it works with both a user who is logged in and renewing their registration or a new user who is purchasing for the first time. After the user finishes and pays they are directed to Hikashop's thank you page and then automatically (after about a couple seconds) redirected to the home page and they are logged out.
Please Log in or Create an account to join the conversation.