Skip to content

Instant Payment Notification

nov matake edited this page May 23, 2011 · 2 revisions

Instant Payment Notification (IPN)

Verification

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.

Clone this wiki locally