Instant Payment Notification - nov/paypal-express GitHub Wiki
Assuming you are using Rails and can access to request.raw_post
.
Since PayPal requires you to sent all parameters in exactly same order and encoding, you will need to access raw POST body.
Paypal::IPN.verify!(request.raw_post)
When it’s valid, it returns true
.
Otherwise it raises Paypal::APIError
.