Class: CandyCheck::PlayStore::SubscriptionVerification

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

Overview

Verifies a purchase token against the Google API The call return either an Receipt or an VerificationFailure

Instance Attribute Summary

Attributes inherited from Verification

#package, #product_id, #token

Instance Method Summary collapse

Methods inherited from Verification

#initialize

Constructor Details

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

Instance Method Details

#call!Subscription, VerificationFailure

Performs the verification against the remote server

Returns:



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

def call!
  verify!
  if valid?
    Subscription.new(@response)
  else
    VerificationFailure.new(@response['error'])
  end
end