Fixed it. I took a look at all my hooks and one of them was handling 404 redirects by hooking into ‘template_redirect’ function. Lesson learnt – don’t hook into core functions without testing them from every angle :-)
You can store PayPal order info in the DB by using s2member hooks and filters. I’d say you’d probably want to hook one of PayPal IPN scripts (depending on your PayPal transaction type) and capture some of that info.
Then you should be able to retrieve and pre-populate your form with data.
Obviously, the key is to hook into the right method – i.e. before, during or after the payment is complete.