Class: CandyCheck::AppStore::SubscriptionVerification

Inherits:
Verification
  • Object
show all
Defined in:
lib/candy_check/app_store/subscription_verification.rb

Overview

Verifies a latest_receipt_info block against a verification server. The call return either an ReceiptCollection or a VerificationFailure

Constant Summary

Constants inherited from Verification

Verification::STATUS_OK

Instance Attribute Summary

Attributes inherited from Verification

#endpoint_url, #receipt_data, #secret

Instance Method Summary collapse

Methods inherited from Verification

#initialize

Constructor Details

This class inherits a constructor from CandyCheck::AppStore::Verification

Instance Method Details

#call!ReceiptCollection, VerificationFailure

Performs the verification against the remote server

Returns:



9
10
11
12
13
14
15
16
# File 'lib/candy_check/app_store/subscription_verification.rb', line 9

def call!
  verify!
  if valid?
    ReceiptCollection.new(@response['latest_receipt_info'])
  else
    VerificationFailure.fetch(@response['status'])
  end
end