PayPal button Thankyou page don't redirect correctly

  • kinui
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 42
  • Thank you received: 2

kinui created the topic: PayPal button Thankyou page don't redirect correctly

HI, I filled a custom thankyou page in this case

www.mydomain.com/en/thank-you

But it always goes to

www.mydomain.com/index.php?option=com_br...m_id=13&record_id=10

Is there any other field I need to complete beside the Thankyou field

Thanks
#238046
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 2651
  • Karma: 92
  • Thank you received: 354

mihaela replied the topic: PayPal button Thankyou page don't redirect correctly

Hello,

Please check whether the "Last Page is Thank You Page" is unchecked on the last page of your form.
If it is not, please uncheck it.

If you have set the correct path to the thank you page, the user should be redirected properly.

Regards,

Mihaela
#238049
  • kinui
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 42
  • Thank you received: 2

kinui replied the topic: PayPal button Thankyou page don't redirect correctly

Hi, the box is unchecked, but still its redirecting my to the componenet page

www.mydomain.com/index.php?option=com_br...m_id=13&record_id=11
#238059
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 2651
  • Karma: 92
  • Thank you received: 354

mihaela replied the topic: PayPal button Thankyou page don't redirect correctly

Hello,

I have just answered the following on the topic that you have created.

Here is my answer.
Hello,

Maybe it would be the best that you send me backend login info so I can take a look at your form and try to figure out why it is not working for you.

Are you sure that you are setting up the correct URL of a page that exists?

I've just tried to recreate your problem but didn't manage to do so. For me, it always displayed the correct thank you page after the payment.

As for redirecting, the solution for redirection based on language is to go to forms Advanced properties > More options > Submit pieces and then in the End Submit section set Type to Custom and put the following code:

$this->execPieceByName('ff_InitLib');
$lang = JFactory::getLanguage();
$lang_tag = $lang->getTag();

if( $lang_tag == 'es-ES' )
JFactory::getApplication()->redirect('es/pago-realizado');
elseif ($lang_tag == 'de-DE')
JFactory::getApplication()->redirect('de/ty-page.html');
NOTE: You would have to put the correct language tags and thank you pages for your site.

The problem is, that this way might interfere with PayPal so that is not the solution in your case.

I think that, in your case, the best solution is the following.

Please create a file in your Joomla root(place where joomla files are on your server) and name it bf_paypal_success.php then paste into it code below:

$lang = JFactory::getLanguage();
$lang_tag = $lang->getTag();

if( $lang_tag == 'es-ES' )
JFactory::getApplication()->redirect('es/pago-realizado');
elseif ($lang_tag == 'en-GB')
JFactory::getApplication()->redirect('en/payment-made');

NOTE: If maybe you have already bf_paypal_success.php file then just add this code to be last. Also, if you use this code, it is importnat that you have no code for redirection in End Submit pieces.
Furthermore, you have to replace language tags and put the correct URLs for redirection.

Please let me know whetehr this time you have received the response on the ticket.

Regards,

Mihaela
#238070
  • kinui
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 42
  • Thank you received: 2

kinui replied the topic: PayPal button Thankyou page don't redirect correctly

Hi, I tried putting the file but it's the same, at the end it redirect to the component url
so I give you the credentials

Thank you
This message contains confidential information
#238075
  • kinui
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 42
  • Thank you received: 2

kinui replied the topic: PayPal button Thankyou page don't redirect correctly

This message contains confidential information
#238080
Moderators: ForumSupporttomeperica
Time to create page: 0.103 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here