Jump to content

PayPal - Bad url return


banense

Recommended Posts

Hi all,

 

I have installed PayPal Europe v.3.7.2 and work fine but when i want to go back the url is wrong. This is the url:

 

http://www.myshop.com/index.phpcontroller=order-opc?paypal_ec_canceled=1&controller=order-opc?rand=1410454513012&token=EC-0YW40823G7009205V

 

Lack the sign ? between index.php and controller. I need fix this. The setCancelUrl() function make the url I think, here is code:

 

public function setCancelUrl(&$fields)
    {
        $url = urldecode(Tools::getValue('current_shop_url'));
        $parsed_data = parse_url($url);



        if (isset($parsed_data['path']))
        {
            $parsed_data['path'] .= '?paypal_ec_canceled=1&';
            $parsed_data['query'] = isset($parsed_data['query']) ? $parsed_data['query'] : null;
        }
        else
        {
            $parsed_data['path'] = '?paypal_ec_canceled=1&';
            $parsed_data['query'] = '/'.(isset($parsed_data['query']) ? $parsed_data['query'] : null);
        }

        $cancel_url = implode($parsed_data);

        if (!empty($cancel_url))
            $fields['CANCELURL'] = $cancel_url;
    }

 

My server is IIS and I use guest checkout for my shop.

 

Someone can help me please?

 

Kind Regards

Edited by banense (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...