I have now done 2 script fixes for folks running the latest version 2.8 and both had $sys_script_folder settings correct. Yet after payment, rather than getting "Return to Merchant" button, payment confirmation page would simply auto re-direct to sales letter.
After eliminating all other possibilities, we found (in both cases) that they had Auto Return feature for Website Payments set to "ON". Upon their turning it to "OFF" (in both cases) the problem was resolved.
So while it is true that the Paypal Integration Guide states that you can set custom return URLs with this setting turned on, the fix still wound up being turning it to "OFF" in both of these cases.
It should be noted that in reviewing older versions of the Paypal Website Payments Standard Integration Guide, it specifically addresses custom return URLs with Auto Return set to "ON", however in the latest version (January 2010) oddly, that reference is no longer there so I am wondering if something maybe changed that affects this. I know there has been some changes in regard to return method (variable rm) vs. return url (variable return_url) and how it should be called but not sure if this affects default auto return or $7DSS in any way.
I also tested this with my installs....
Originally my Auto Return Setting was set to "OFF". After experiencing this with the 2 previous folks I went in and turned mine to "ON" and I was able to re-create the same thing...Paypal auto returned to my sales letter. Upon turning setting back to "OFF" went back to getting "Return to Merchant" button and return working properly.