Rails Casts #142 Paypal Notifications

Hey all,

I ran into a bit of an issue in Rails Cast #142. I received the following error while testing the IPN:

WARNING: Can't verify CSRF token authenticity
Completed 500 Internal Server Error in 2ms
app/controllers/payment_notifications_controller.rb:11:in `process_ipn_payment'

Simply replace the following line with the alternative below it:

  1. #Payment_Notifications_Controller.rb
  2. protect_from_forgery :except => [:create]
  1. #Payment_Notifications_Controller.rb
  2. skip_before_filter :verify_authenticity_token, :only => [:create]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.