Skip to content

Instantly share code, notes, and snippets.

@ruslux
Created July 24, 2019 05:31
Show Gist options
  • Save ruslux/5760e41241e209f87b89a8f2431360ae to your computer and use it in GitHub Desktop.
Save ruslux/5760e41241e209f87b89a8f2431360ae to your computer and use it in GitHub Desktop.
google_api.py
bundle_id = 'gogoyuedu.book.job.news.learn.read'
api_key = 'Alkene-608a20735120.json'
validator = GooglePlayVerifier(bundle_id, api_key)
try:
validation_result = validator.verify(purchase_json['token'], sub_code, is_subscription=True)
except errors.GoogleError as exc:
logging.error('Purchase validation failed {}'.format(exc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment