It will be quicker for you to use the paypal class than to figure out what is wrong with your code.
If you had provided all of the code set up to use the PayPal sandbox then it would be easy to take that code and duplicate the error. What you have provided isn't sufficient to do that. There is definitely more that you need to make IPN work so I assume that you have other code that you haven't provided.
Reputation Points: 210
Solved Threads: 228
Nearly a Posting Virtuoso
Offline 1,389 posts
since Sep 2008