Paypal validation troubles

I'm using the paypal-ruby plugin and I have it all working -- except
the validation of the IPN. I get the post from payal, and it gets
posted back to PayPal for verification by the plug code, and it all
looks right to me, but PayPal returns INVALID. Has anyone else seen
this or have any tips for what to look for?



A common cause for this would be forgetting to remove :action and :controller from the params hash before posting them back to PayPal.

Hello Michael,

Thanks everyone for your suggestions. I'm using the paypal-ruby plugin
which takes care of making sure that the parameters are properly
echoed back. I spent hours scrutinizing what it was doing and just
couldn't find any problem with the data posted back.

It turns out that the data was in fact fine, and the problem was very
simple: I was using the sandbox for initial transaction, but the
verification post was going to the main paypal server, so of course it
didn't recognize it.

How did I do such a foolish thing? In the paypal ruby plugin, the URL
is set as a class variable. I overrode this in the environment file
but didn't take the setting out of the plugin code. But when the
plugin code accesses the URL using

uri = URI.parse(self.class.ipn_url)

It picks up the version in the class definition, not my attempt to
override it in the environment file.