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

#   Redirect using PayPal &amp; PayPal Pro

##

- **[lovelyweapon](/forum/user/7628-lovelyweapon "View lovelyweapon's Profile")**
- [![lovelyweapon's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7628.jpeg)](/forum/user/7628-lovelyweapon "View lovelyweapon's Profile") Topic Author
- [ Offline](/forum/user/7628-lovelyweapon)

Less More

- Posts: 11
- Thank you received: 0
-
-
-
- [](http://www.rachelyordan.com)
-

14 years 4 months ago [\#55955](#55955) by [lovelyweapon](/forum/user/7628-lovelyweapon "View lovelyweapon's Profile")  *[Redirect using PayPal &amp; PayPal Pro](/forum/4-how-to/55955-redirect-using-paypal-paypal-pro#55955 "Hi everyone. I offer both PayPal and PayPal Pro as payment options. I want every end process to show order details, similar to what a customer would receive in their confirmation email. As per another...")* was created by *[lovelyweapon](/forum/user/7628-lovelyweapon "View lovelyweapon's Profile")*

Hi everyone. I offer both PayPal and PayPal Pro as payment options. I want every end process to show order details, similar to what a customer would receive in their confirmation email. As per another thread where Nicholas mentions adding the code below to either end.php or after_end.php depending on whether payment is internal or external, I have done that, which works perfectly when I add it to either end or after_not, but not to both. Since I offer both payment options, how can I ensure that both payment options redirect correctly? When I add it to end.php and try to pay with PayPal, it redirects me prematurely and I cannot pay.

The code I'm trying to add:
$app=&amp; JFactory::getApplication();
$app-&gt;redirect(hikashop::completeLink('order&amp;task=show&amp;order_id='.$app-&gt;getUserState('com_hikashop.order_id'),false,true));

This is what I currently have configured:

- On HikaShop I have left the end URL/return URL blank for both PayPal and PayPal Pro, just in case.

- Checkout workflow: confirm_cart_coupon_login_address_shipping_payment_fields_status,end

- On the PayPal end, I am required to put a return URL, and I have index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=after_end

What should I change to achieve this?

Thank you in advance! The support on here is incredible, and I'll be recommending HikaShop as often as I can.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU1OTU1LXJlZGlyZWN0LXVzaW5nLXBheXBhbC1wYXlwYWwtcHJvP3RtcGw9bWFya2Rvd24=) 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: 86359
- Thank you received: 14296
-
-

14 years 4 months ago [\#55979](#55979) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Redirect using PayPal &amp; PayPal Pro](/forum/4-how-to/55955-redirect-using-paypal-paypal-pro#55979 "Hi everyone. I offer both PayPal and PayPal Pro as payment options. I want every end process to show order details, similar to what a customer would receive in their confirmation email. As per another...")*

Hi,

You will have to use that code in the end.php file then:

$app =&amp; JFactory::getApplication();
$order_id=$app-&gt;getUserState( HIKASHOP_COMPONENT.'.order_id' );
$class = hikashop_get('class.order');
$order= $class-&gt;get($order_id);
if($order-&gt;order_payment_method!='paypal'){
$app-&gt;redirect(hikashop::completeLink('order&amp;task=show&amp;order_id='.$order_id,false,true));
}

The following user(s) said Thank You: [kleeph](/forum/user/4268-kleeph "View kleeph's Profile")

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

- **[lovelyweapon](/forum/user/7628-lovelyweapon "View lovelyweapon's Profile")**
- [![lovelyweapon's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7628.jpeg)](/forum/user/7628-lovelyweapon "View lovelyweapon's Profile") Topic Author
- [ Offline](/forum/user/7628-lovelyweapon)

Less More

- Posts: 11
- Thank you received: 0
-
-
-
- [](http://www.rachelyordan.com)
-

14 years 4 months ago [\#55997](#55997) by [lovelyweapon](/forum/user/7628-lovelyweapon "View lovelyweapon's Profile")  Replied by *[lovelyweapon](/forum/user/7628-lovelyweapon "View lovelyweapon's Profile")* on topic *[Re: Redirect using PayPal &amp; PayPal Pro](/forum/4-how-to/55955-redirect-using-paypal-paypal-pro#55997 "Hi everyone. I offer both PayPal and PayPal Pro as payment options. I want every end process to show order details, similar to what a customer would receive in their confirmation email. As per another...")*

Hi Nicolas! Thank you so much for the fast response, I added it. Should I now change the PayPal return URL to end instead of after_end, or leave it to after_end?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU1OTU1LXJlZGlyZWN0LXVzaW5nLXBheXBhbC1wYXlwYWwtcHJvP3RtcGw9bWFya2Rvd24=) 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: 86359
- Thank you received: 14296
-
-

14 years 4 months ago [\#56007](#56007) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Redirect using PayPal &amp; PayPal Pro](/forum/4-how-to/55955-redirect-using-paypal-paypal-pro#56007 "Hi everyone. I offer both PayPal and PayPal Pro as payment options. I want every end process to show order details, similar to what a customer would receive in their confirmation email. As per another...")*

Hi,
You should leave the return url field empty I think.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU1OTU1LXJlZGlyZWN0LXVzaW5nLXBheXBhbC1wYXlwYWwtcHJvP3RtcGw9bWFya2Rvd24=) 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.048 seconds

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