Skip to main content

This Django app created for check response token that taken from Google Play or Bazaar is valid or not . and choice with method you want to confirm your purchase with that.

Project description

Google Play and Bazaar in-app purchase

This Django app created to check the response token that is taken from Google Play or Bazaar is valid or not. and choice with the method you want to confirm your purchase with that.

STEP 1

Install

  1. pip install django-google-bazaar-payment
  2. pip install requests
  3. Add "google_bazaar_payment" to your INSTALLED_APPS setting like this:
    INSTALLED_APPS = [
        ...
        'google_bazaar_payment',
    ]
  1. Run python manage.py migrate to create the google_bazaar_payment models

STEP 2

Google Play Implementation

  1. you must add GOOGLE_BUNDLE_ID to your project settings like this:
	GOOGLE_BUNDLE_ID = "com.package.android"
  1. Go to Django admin panel and in the payment section add a new record with information that you got from this link: Authorization
  2. Set the field type in the record you created to Google Play
  3. init token in record is the first token and initializer token that you took from the top link and this will use just one time .

STEP 3 For Bazaar Users

Bazaar Implementation

  1. you must add BAZAAR_BUNDLE_ID to your project settings like this:
	BAZAAR_BUNDLE_ID = "com.package.android"
  1. Go to Django admin panel and in the payment section add a new record with information that you got from this link : Authorization
  2. Set the field type in the record you created to Bazaar
  3. init token in record is the first token and initializer token that you took from the top link and this will use just one time. .

STEP 4 How to use

from google_bazaar_payment.payment.google_bazaar_payment import GBPayment

result = GBPayment.check_purchased_token(token="token that you received from server", product_id="product_id", type=0)
# type = 0 google play
# type = 1 Bazaar
if result:
    print("token is valid")
else:
    print("token is not valid OR there is an error if you get error you will see it in logs")
Copyright 2020 MiladNalbandi

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-google-bazaar-payment-1.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_google_bazaar_payment-1.2-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file django-google-bazaar-payment-1.2.tar.gz.

File metadata

  • Download URL: django-google-bazaar-payment-1.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for django-google-bazaar-payment-1.2.tar.gz
Algorithm Hash digest
SHA256 f5d6339fa1f2249d14788092732859fc644ea0a772f11228ece55e5022b5c838
MD5 e5bd69fc3c1322146a762138513f766f
BLAKE2b-256 76595bc0a6031af43bf7336defa9a7b9b5a0a8ed80155f5ff9ee0116cf62af47

See more details on using hashes here.

File details

Details for the file django_google_bazaar_payment-1.2-py3-none-any.whl.

File metadata

  • Download URL: django_google_bazaar_payment-1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for django_google_bazaar_payment-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 13c2ac2f82012a8831e48a2005aac8b85b15193d69b920199eb0f74b48b7f6ea
MD5 43b86e6e50305fe0acc36312c6beb03d
BLAKE2b-256 3ca0e200b10e18b35a17678c74fc68d6b64284f3d3dbd3ae91668a35a7d6ddde

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page