Sorry, the post got mashed up for some reason. Fixed version follows:
Hi,
after hours of investigation I finally found out why PayPal IPN notifications didn't work for me.
It turned out that they way the post string for the IPN verification is being built incorrectly by the PayPalIPNParameters class.
The problem occurs when there are special characters (like German umlauts) present in the PayPal form parameters.
I could fix the problem by changing the constructor for the PayPalIPNParameters class to:
public PayPalIPNParameters(byte[] param, NameValueCollection requestForm) : base(requestForm)
{
string strRequest = System.Text.Encoding.ASCII.GetString(param);
strRequest += "&cmd=_notify-validate";
_postString = strRequest;
}
The constructor must then be called as follows:
PayPalIPNParameters ipn = new PayPalIPNParameters(Request.BinaryRead(Request.ContentLength), Request.Form);
With this modification I finally got PayPal IPN to work successfully!
Best regards,
Matthias