[Skip to main content](#vessel-content)

#   Paypal Pro Payments redirection

##

- **[Scott](/forum/user/31695-scott "View Scott's Profile")**
- [![Scott's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31695-scott "View Scott's Profile") Topic Author
- [ Offline](/forum/user/31695-scott)

Less More

- Posts: 21
- Thank you received: 2
-
-

12 years 4 months ago -  12 years 4 months ago [\#161757](#161757) by [Scott](/forum/user/31695-scott "View Scott's Profile")  *[Paypal Pro Payments redirection](/forum/29-payment-methods/869260-paypal-pro-payments-redirection#161757 "-- 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 &quot;Thank you for your purchase.&quot;  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 &quot;Thank you for your purchase.&quot;  I then tried editing the &quot;after&#95;end&quot; code to the following:  That doesn't work either, it still redirects to the same &quot;Thank you for your purchase.&quot;. I suspect that I may have to edit the paypalpro&#95;thanks.php but I'm not sure what edits I need to make or where to put them in this file:  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")* was created by *[Scott](/forum/user/31695-scott "View Scott's Profile")*

-- 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:
Code:

&lt;?php defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php $doc =&amp; JFactory::getDocument(); $doc-&gt;addScriptDeclaration("window.addEvent('domready', function() {window.location='http://**********************/index.php?option=com_content&amp;view=article&amp;id=159:payment-success&amp;catid=78:main-content&amp;Itemid=639'});"); ?&gt;

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:
Code:

&lt;?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'); ?&gt;&lt;div class="hikashop_paypalpro_thankyou" id="hikashop_paypalpro_thankyou"&gt; &lt;span id="hikashop_paypalpro_thankyou_message" class="hikashop_paypalpro_thankyou_message"&gt; &lt;?php echo JText::_('THANK_YOU_FOR_PURCHASE'); if(!empty($this-&gt;payment_params-&gt;return_url)){ echo '&lt;br/&gt;&lt;a href="'.$this-&gt;payment_params-&gt;return_url.'"&gt;'.JText::_('GO_BACK_TO_SHOP').'&lt;/a&gt;'; }?&gt; &lt;/span&gt; &lt;/div&gt; &lt;?php if(!empty($this-&gt;payment_params-&gt;return_url)){ $doc = JFactory::getDocument(); $doc-&gt;addScriptDeclaration("window.addEvent('domready', function() {window.location='".$this-&gt;payment_params-&gt;return_url."'});"); }

I'm not a programmer so could you keep it simple for me please ![:)](/media/kunena/emoticons/3.png ":)")

Also, is it possible to include the order details in my new joomla thank you page?

Thanks in advance for any help

Last edit: 12 years 4 months ago by [Scott](/forum/user/31695-scott "View Scott's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NjkyNjAtcGF5cGFsLXByby1wYXltZW50cy1yZWRpcmVjdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86560
- Thank you received: 14307
-
-

12 years 4 months ago [\#161965](#161965) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Paypal Pro Payments redirection](/forum/29-payment-methods/869260-paypal-pro-payments-redirection#161965 "-- 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 &quot;Thank you for your purchase.&quot;  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 &quot;Thank you for your purchase.&quot;  I then tried editing the &quot;after&#95;end&quot; code to the following:  That doesn't work either, it still redirects to the same &quot;Thank you for your purchase.&quot;. I suspect that I may have to edit the paypalpro&#95;thanks.php but I'm not sure what edits I need to make or where to put them in this file:  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")*

Hi,

Normally, there is no code to change. You just need to enter your URL in the "return URL" option of the plugin and it will do the redirection automatically.

If that doesn't work, it means that there must be a javascript error on the page. Adding other custom javascript in the view won't help in that case since the javascript error will still be there.
You have two ways to go about it:
- You look at the javascript error via your browser's error console and you see if you can fix it. But it might be quite complex to do.
- You add custom PHP code for the redirect in that file: Code:

$app =JFactory::getApplication(); $app-&gt;redirect('http://**********************/index.php?option=com_content&amp;view=article&amp;id=159:payment-success&amp;catid=78:main-content&amp;Itemid=639');

But if you want to include the details of the order, I would recommend to simply redirect to the order details page: Code:

$app =JFactory::getApplication(); $app-&gt;redirect('http://**********************/index.php?option=com_hikashop&amp;ctrl=order&amp;task=show&amp;order_id='.$app-&gt;getUserState('com_hikashop.order_id'));

The following user(s) said Thank You: [Scott](/forum/user/31695-scott "View Scott's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NjkyNjAtcGF5cGFsLXByby1wYXltZW50cy1yZWRpcmVjdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Scott](/forum/user/31695-scott "View Scott's Profile")**
- [![Scott's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31695-scott "View Scott's Profile") Topic Author
- [ Offline](/forum/user/31695-scott)

Less More

- Posts: 21
- Thank you received: 2
-
-

12 years 4 months ago -  12 years 4 months ago [\#161967](#161967) by [Scott](/forum/user/31695-scott "View Scott's Profile")  Replied by *[Scott](/forum/user/31695-scott "View Scott's Profile")* on topic *[Paypal Pro Payments redirection](/forum/29-payment-methods/869260-paypal-pro-payments-redirection#161967 "-- 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 &quot;Thank you for your purchase.&quot;  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 &quot;Thank you for your purchase.&quot;  I then tried editing the &quot;after&#95;end&quot; code to the following:  That doesn't work either, it still redirects to the same &quot;Thank you for your purchase.&quot;. I suspect that I may have to edit the paypalpro&#95;thanks.php but I'm not sure what edits I need to make or where to put them in this file:  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")*

Thank you for the reply Nicolas.

Do I need to apply that code in the paypalpro_thanks.php?

If so, whereabouts would I place it? (Sorry, I'm not a good programmer)

Thanks again.

Last edit: 12 years 4 months ago by [Scott](/forum/user/31695-scott "View Scott's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NjkyNjAtcGF5cGFsLXByby1wYXltZW50cy1yZWRpcmVjdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86560
- Thank you received: 14307
-
-

12 years 4 months ago [\#162023](#162023) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Paypal Pro Payments redirection](/forum/29-payment-methods/869260-paypal-pro-payments-redirection#162023 "-- 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 &quot;Thank you for your purchase.&quot;  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 &quot;Thank you for your purchase.&quot;  I then tried editing the &quot;after&#95;end&quot; code to the following:  That doesn't work either, it still redirects to the same &quot;Thank you for your purchase.&quot;. I suspect that I may have to edit the paypalpro&#95;thanks.php but I'm not sure what edits I need to make or where to put them in this file:  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")*

Yes, in that same file.
You can place it just after the first line where there is the &lt;?php opening tag.

The following user(s) said Thank You: [Scott](/forum/user/31695-scott "View Scott's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84NjkyNjAtcGF5cGFsLXByby1wYXltZW50cy1yZWRpcmVjdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.049 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
