-- HikaShop version -- : latest version
-- Joomla version -- : latest version
I'm using Paypal Pro to process credit card payments on my site. However, I'm having problems with redirection after payment. Using Paypal Pro, its all processed in the background so the user is never taken to Paypals site. After clicking finish on the shopping cart, the payment is processed and your immediately redirected to "Thank you for your purchase."
I'd like to redirect the page to my own custom thank you page.
I've searched this on the forum and the solutions don't appear to work for me. Firstly, the return URL setting in the Paypal Pro plug-in doesn't work. I entered an address and it was completely ignored and just went to the standard "Thank you for your purchase."
I then tried editing the "after_end" code to the following:
<?php
defined('_JEXEC') or die('Restricted access');
?><?php
$doc =& JFactory::getDocument();
$doc->addScriptDeclaration("do_nothing( function() {window.location='http://**********************/index.php?option=com_content&view=article&id=159:payment-success&catid=78:main-content&Itemid=639'});");
?>
That doesn't work either, it still redirects to the same "Thank you for your purchase.". I suspect that I may have to edit the paypalpro_thanks.php but I'm not sure what edits I need to make or where to put them in this file:
<?php
/**
* @package HikaShop for Joomla!
* @version 2.3.0
* @author hikashop.com
* @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><div class="hikashop_paypalpro_thankyou" id="hikashop_paypalpro_thankyou">
<span id="hikashop_paypalpro_thankyou_message" class="hikashop_paypalpro_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)){
$doc = JFactory::getDocument();
$doc->addScriptDeclaration("do_nothing( function() {window.location='".$this->payment_params->return_url."'});");
}
I'm not a programmer so could you keep it simple for me please
Also, is it possible to include the order details in my new joomla thank you page?
Thanks in advance for any help