Have you tried to create a paypal button and pass a return URL to paypal that includes some paramters and experienced that paypal will only return visitors to your main page, ignoring your GET parameters ?

something like:

<input type=”hidden” name=”return” value=”http://www.mypage.com/index.php?display=thankyou”>

will not work unless you also specify this parameter:

<input type=”hidden” name=”rm” value=”2″>

this will instruct paypal to post its own parameters as POST and keep your parameters as GET.

Or as explained in the Paypal documentation:

“a value of 2 means: the payer’s browser is redirected to the return URL by the POST method, and all transaction variables are also posted”

Hope this will help someone.