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?

Thanks,

Michael

On Feb 20, 2007, at 18:49 , Michael S. wrote:

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.


Jakob S. - http://mentalized.net

Hello Michael,

2007/2/20, Michael S. [email protected]:

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?

I had some problems too. Net::HTTP has a debug parameter you can use
to see the exact requests/responses. I think it’s called
#set_debug_output or something.

Hope that helps !

François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/

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.

Michael

On Feb 21, 4:04 pm, “François Beausoleil”