Recently, I had to write a service on Ruby-on-Rails project to validate an in-store purchase for iPhone application. Though, it was fairly straight forward, but I am posting the code in case someone else needs it: 1 require 'net/http' 2 require 'net/https' 3 require 'uri' 4 5 class AppleReceiptVerifier 6 # 7 ### Verifies Apple receipt submitted by iPhone 8 ### See http://developer.apple.com/iphone