require 'httparty' class ItunesVerification include HTTParty base_uri 'https://sandbox.itunes.apple.com' default_params :output => 'json' format :json def self.verify_apple_receipt(apple_receipt) post('/verifyReceipt', :body=>{'receipt-data' => apple_receipt}) end end