There are official code samples for several languages but couldn\'t find one for Rails.
PayPal's Ruby Merchant SDK provides an ipn_valid?
boolean method to make this super easy on you.
def notify
@api = PayPal::SDK::Merchant.new
if @api.ipn_valid?(request.raw_post) # return true or false
# params contains the data
end
end
https://github.com/paypal/merchant-sdk-ruby/blob/master/samples/IPN-README.md