iox/seamless-donations — pull request #5 by iox (2014-07-07 14:09:39+00:00)
Title: Fix problems with INVALID IPN calls when parsing addresses containing quotes

Hi Rasmus,

I found a way to reproduce our "INVALID" IPN issues. I changed the address of one of my Sandbox users to contain quotes, something like `Rue 'Invented 8`. Then I subscribed with this user and I could see the "INVALID" IPN issue in my local logs.

With this information, I searched for a solution and went back to Paypal's official documentation. It turns out that Seamless Donations implementation of the IPN is not updated. The Paypal docs have a note saying that serialization issues can occur if you use `$_POST` instead of `php://input` with Paypal. So I just copied their example, replaced the old code... and it works! No more INVALID errors.

We'll have to test it in production during some time to be completely sure, but I think we are in the right track.

Warm regards,
Ignacio