RUBY ON RAILS - PayPal IPN Stopped Working 422 Error

I was using PayPal Web Standard and receiving IPN notices from my payments perfectly fine for a couple months. Earlier this week it stopped working. I have not changed any of the code for the function in sometime. I figured I would try here as a last resort as PayPal support pretty much just said, "not our problem".

I'm using ruby 1.8.7 and rails 2.3.9. I more or less just followed step by step the railscasts for setting up PayPal standard. http://railscasts.com/episodes/archive?search=paypal

Looking through the logs on the server. I am getting 422 errors with error ActionController::InvalidAuthenticityToken.

I'm already using: protect_from_forgery :except => [:paypal_IPN]

It is not getting to the paypal_ipn function

Any help is appreciated.

This question and answers originated from www.stackoverflow.com
Question by (9/30/2010 8:29:37 PM)

Answer

Turns out it was a bonehead mistake on my end. The route that received the IPNs was setup to receive get requests and not post request. Changing the method in my routes file to use post fixed the issue. This doesn't explain why it was working for the few months prior.

Answer by

Find More Answers
Related Topics  ruby-on-rails  paypal
Related Questions
  • paypal ipn ssl error

    i use the class ipnlistener at https://github.com/Quixotix/PHP-PayPal-IPN/blob/master/ipnlistener.php my platform: xmapp php5.3.5, windows 7 i use the ipn simulator to test the class, but th…
  • Paypal IPN script not working

    For some reason my script connects to the database and has no errors however nothing in the database seems to update. I cannot find anything wrong with it. Here is my code: // read the post fro…
  • Paypal subscriptions IPN - problem with users subscribing multiple times

    I'm using paypal subscriptions and the instant payment notification (IPN) to handle subscribers on my site. For the most part it works well but there is one occasional problem I've encountered. …
  • Django-Paypal IPN 403 Error

    I was working on the paypal ipn listener - it didn't seem to be 'hearing' the signals, although the database was updated so I know the ipn was accepted by the paypal.standard.ipn package. Now I g…
  • Paypal IPN Acknowledge Failing Only On Live Site (Not In Sandbox)

    We're trying to get IPN working with the Paypal gem (Paypal::Notification). Everything works fine in the sandbox, but against the live site paypal returns INVALID every time for acknowledge. Here…
  • Rails Paypal IPN - payment from different client to customers on on site

    A bit of a newbie regarding payment on rails, please help :-) I have a Rails application that provides a way to manage bills. A Customer can signup, get their own subdomain etc and create invoice…
  • PayPal IPN script is not working

    So i recently created PayPal IPN script, but while I was testing it with Sandbox (test) accounts, I saw problem, everything was excellent, except it just didn't insert any data in database, well ver…
  • Error in .ashx for Paypal IPN

    im getting the following error from an ashx file. Is this the wrong endpoint or something? When visiting the ashx thruogh the sandbox tool it spits out the error "IPN delivery failed. HTTP error cod…
  • Routing Error on PayPal Re-direct

    I'm having an issue integrating PayPal into my Rails 3 app using Ryan Bates's screencasts as a guide ( http://railscasts.com/episodes/143-paypal-security ). After payment's complete on the PayPal…
  • How to implement Paypal callbacks in Rails? (Getting InvalidAuthenticityToken error)

    Edit : This is a mostly Rails question I'm trying to implement instant payment notification API (IPN), which calls your server if the Paypal payment goes through. The problem I'm seeing now is wh…