Zen Cart Logo
Forums / Addon Payment Modules / Pagosonline.net Payment module returns to wrong URL

Pagosonline.net Payment module returns to wrong URL

Locked

Views: 3,089

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
8 Aug 2009, 5:17 PM
#1
mutester avatar

mutester

New Zenner

Join Date:
May 2009
Location:
Bogota, Colombia
Posts:
28
Plugin Contributions:
0

Pagosonline.net Payment module returns to wrong URL

when a customers returns from the page of our payment processor, Pagosonline.net, to checkout_succes.php, they get send to the default language. As we have both English and Spanish(default) installed, I need it to return to the language that the customer started his session in.

This is the response URL that their module uses:

$url_respuesta= HTTP_SERVER . DIR_WS_CATALOG . "index.php?main_page=checkout_success";

I tried many things and this one got me the closest:

$url_respuesta= 'www.cazadecasa.com/includes/languages/' . $_SESSION['language'] . '/unik/'. "checkout_process.php";

result is:

http://www.mundounik.com/es/includes/languages/spanish/unik/checkout_process.php

But the "es" should not be there!

Anyone know how I can make this work with different languages? Not sure if it is relevant but I am using also SSU (SEO URL´s).

Our page is: https://www.mundounik.com

Thanks!

10 Aug 2009, 8:15 PM
#2
sr_nathan avatar

sr_nathan

New Zenner

Join Date:
Aug 2009
Posts:
2
Plugin Contributions:
0

Re: Pagosonline.net Payment module returns to wrong URL

Good afternoon:

This is like PHP builds it:

$url_respuesta= HTTP_SERVER . DIR_WS_CATALOG . "index.php?main_page=checkout_success"

I was checking your website and this is how it builds it:

     *name="url_respuesta" value="http://www.mundounik.com/index.php?main_page=checkout_success"*

I modified /includes/modules/payment/pagosonline.php like this, but I don't have a Zencart with two languajes, so these are my suggestions:

*//pagina de respuesta

   $url_respuesta= HTTP_SERVER . $_SESSION['languages_code'] . DIR_WS_CATALOG . "index.php?main_page=checkout_success";  *

---------------------- domain name . languaje . catalog root . "index.php?main_page=checkout_success"; ------

If it doesn't work try to put them like this:

	if(['languages_code']=='es']
	{
		$url_respuesta="https://www.mundounik.com/es/index.php?main_page=checkout_success";  
	}
	
	else if ($_SESSION['languages_code']=='en')
	{
		$url_respuesta= "https://www.mundounik.com/en/index.php?main_page=checkout_success";  
	}

I hope this help you.

Good luck

10 Aug 2009, 9:28 PM
#3
mutester avatar

mutester

New Zenner

Join Date:
May 2009
Location:
Bogota, Colombia
Posts:
28
Plugin Contributions:
0

Re: Pagosonline.net Payment module returns to wrong URL

thanks for your reply!

unfortunately both solutions send me back to the spanish version of the checkout success. I can see in the browser that the link gets send back properly but than it gets changed for some reason..

Any idea why?

10 Aug 2009, 9:44 PM
#4
mutester avatar

mutester

New Zenner

Join Date:
May 2009
Location:
Bogota, Colombia
Posts:
28
Plugin Contributions:
0

Re: Pagosonline.net Payment module returns to wrong URL

seems that I have it working now with this code:

if($_SESSION['languages_code']=='es')
{
$url_respuesta="http://www.mundounik.com/index.php?main_page=checkout_success&language=es";
}

else if ($_SESSION['languages_code']=='en')
{
$url_respuesta= "http://www.mundounik.com/index.php?main_page=checkout_success&language=en";
}

As you can see I just added the "&language=" in the end...now it picks the right language.

Will do some more testing, but if I do not reply here anymore..this is my solution!

Thanks!!

12 Aug 2009, 1:14 PM
#5
sr_nathan avatar

sr_nathan

New Zenner

Join Date:
Aug 2009
Posts:
2
Plugin Contributions:
0

Re: Pagosonline.net Payment module returns to wrong URL

MUtester:

seems that I have it working now with this code:

if($_SESSION['languages_code']=='es')
{
$url_respuesta="http://www.mundounik.com/index.php?main_page=checkout_success&language=es";
}

else if ($_SESSION['languages_code']=='en')
{
$url_respuesta= "http://www.mundounik.com/index.php?main_page=checkout_success&language=en";
}

As you can see I just added the "&language=" in the end...now it picks the right language.

Will do some more testing, but if I do not reply here anymore..this is my solution!

Thanks!!

Thanks to you for the answer.

:clap::clap:

14 Aug 2009, 12:18 AM
#6
mutester avatar

mutester

New Zenner

Join Date:
May 2009
Location:
Bogota, Colombia
Posts:
28
Plugin Contributions:
0

Re: Pagosonline.net Payment module returns to wrong URL

Nathan, any chance you can help me with a similar issue I posted in http://www.zen-cart.com/forum/showthread.php?p=768876#post768876 ?? Again a session language problem, but I am not understanding well how the URL in that case is build...THANKS ;)