Redirection to PayPal not working

deje
Contributor
Contributor

The following routine does not redirect to PayPal:

 

Snippet

	function RedirectToPayPalDG ( $token )
	{
		global $PAYPAL_DG_URL;
		
		// Redirect to paypal.com here
		$payPalURL = $PAYPAL_DG_URL . $token;
 
    echo 'url='.$payPalURL . $tokenL;
 
		header("Location: ".$payPalURL);
		exit;
	}

 

Here is the value of the echo:

url=https://www.sandbox.paypal.com/incontext?token=EC-77041592TS907273M

 

If I copy the URL to a browser window, I am taken to a PayPal payment page. Try it.

 

I would appreciate a resolution to this issue.

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.