lib/itunes/receipt.rb in itunes-receipt-0.1.2 vs lib/itunes/receipt.rb in itunes-receipt-0.1.3

- old
+ new

@@ -47,9 +47,13 @@ @receipt_data = attributes[:latest_receipt] if attributes[:receipt_type] == :latest # it feels wrong to include the receipt_data for the latest receipt on anything other than the latest receipt @itunes_env = attributes[:itunes_env] || Itunes.itunes_env end + def sandbox? + itunes_env == :sandbox + end + def self.verify!(receipt_data, allow_sandbox_receipt = false) request_data = {:'receipt-data' => receipt_data} request_data.merge!(:password => Itunes.shared_secret) if Itunes.shared_secret response = post_to_endpoint(request_data) begin