Can't get marketpress to recognise paypal IPN

I've been pulling my hair out for a few days now and have been through every thread on here I can find.

I am using marketpress on a single installation of wordpress - i.e. just a single cart.

I am using paypal sanbox. Both the sandbox user and sandbox owner of the business are using the same currency. Transactions are occuring, and payment being transfered correctly from paypal sanbox side of things.

but I can't get marketpress to deal with paypal IPN data.

I have set the IPN notification URL in paypal itself.

I have put a mail function inside the process_ipn_return function so that I am emailed every time it is called.

If I go directly to the IPN notification URL then I get an email and the page loads saying that variables are missing. This is as I would expect.

If I use the IPN simulator in developer.paypal.com then it says it is sent correctly - but no email, nothing happens.

When I run payments through the website then the payment side of things goes fine, but process_ipn_return is not called.

In my IPN history it is recording that the IPN is being sent, that it is HTTP status 200, the IPN message is all as I would expect, but again no email so the process_ipn_return function is not being called.

On top of all of this I can't get my return URL to display the contents of the cart - but I'll get to that once this is fixed.

Any ideas?