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
- pip install app
- pip install requests
- Add "google_bazaar_payment" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...
'google_bazaar_payment',
]
- Run
python manage.py migrate
to create the google_bazaar_payment models
STEP 2
Google Play Implementation
- you must add
GOOGLE_BUNDLE_ID
to your project settings like this:
GOOGLE_BUNDLE_ID = "com.package.android"
- Go to Django admin panel and in the payment section add a new record with information that you got from this link: Authorization
- Set the field type in the record you created to
Google Play
- 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
- you must add
BAZAAR_BUNDLE_ID
to your project settings like this:
BAZAAR_BUNDLE_ID = "com.package.android"
- Go to Django admin panel and in the payment section add a new record with information that you got from this link : Authorization
- Set the field type in the record you created to
Bazaar
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-google-bazaar-payment-1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d21226aa706375ffa866ba5e52471a83b0a7ba8569ed9f3f8cbc8fa4bd222993 |
|
MD5 | a2a7bd7942df22aa320e695fbd995bc8 |
|
BLAKE2b-256 | 6c685cbb6957751caec32131f56ef4c8cc22d30f2e618a4fbe115534e2e8a919 |
Close
Hashes for django_google_bazaar_payment-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33b8a2266ba8da70ca1202c6d0163546adb5105063dbf9aac3c6a918d29f6a42 |
|
MD5 | 633c608776efd976c5a58098e4b62263 |
|
BLAKE2b-256 | 2ff5e1d5f8a589d5cf3f0da59eb291688b23924a1e03f9a8bbca9d8f3f977fb0 |