There are official code samples for several languages but couldn\'t find one for Rails.
I have implement IPN in one of my project and your code look fine. So what is the problem u r facing ?