pyinapp_purchase
pyinapp_purchase is an open-source Python library designed to simplify and securely validate, consume and acknowledge in-app purchase tokens server side. This library provides an efficient and straightforward way to handle token verification, consumption and acknowledgement making it easier to manage app transactions and ensure validity directly from your backend.
Service Account Private Key from Google Cloud is need, as json file.
Features
- Seamless Integration: Quickly integrate the validator into existing Python applications.
- Verification: Handles token verification directly with the Google Play Store API to ensure data authenticity.
- Consumption: Handles token consumption if token wasn't consume client side.
- Acknowledgement: Handles token acknowledgement.
- Error Handling: Provides clear feedback for successful or failed token validations.
- Lightweight and Performant: Minimal dependencies and optimized for fast, reliable performance.
Installation
pip install pyinapp-purchase
Usage
verifying purchase
from google_purchase import GooglePurchaseProduct
google_purchase = GooglePurchaseProduct("google api.json")
package_name = "com.example.app"
product_id = "first_product"
purchase_token = "token"
data = google_purchase.verify_purchase(package_name, product_id, purchase_token)
print(data)
consume purchase
from google_purchase import GooglePurchaseProduct
google_purchase = GooglePurchaseProduct("google api.json")
package_name = "com.example.app"
product_id = "first_product"
purchase_token = "token"
data = google_purchase.consume_purchase(package_name, product_id, purchase_token)
print(data)
acknowledge purchase
from google_purchase import GooglePurchaseProduct
google_purchase = GooglePurchaseProduct("google api.json")
package_name = "com.example.app"
product_id = "first_product"
purchase_token = "token"
data = google_purchase.acknowledge_purchase(package_name, product_id, purchase_token)
print(data)
Todo
Metadata
Release files for pyinapp-purchase 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyinapp_purchase-0.0.5.tar.gz | 4.1 kB | Without provenance | Details for pyinapp_purchase-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyinapp_purchase-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for pyinapp_purchase-0.0.5-py3-none-any.whl |
Total release size: 9.0 kB
Release files / pyinapp_purchase-0.0.5.tar.gz
| Download URL | pyinapp_purchase-0.0.5.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad5cfd52ebf2c0834fccd7538776d4f451cce2896061cda7a5ff8076180fcdb6
|
|
BLAKE2b-256 checksum How to use checksums |
327843263cd4256224755f5a14aab7f43972dab35789a0de7106595004bc9680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Release files / pyinapp_purchase-0.0.5-py3-none-any.whl
| Download URL | pyinapp_purchase-0.0.5-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edd12c78eb2f497a70c57eefc00c02627974c251c969d1f4d67d4e8702f667e7
|
|
BLAKE2b-256 checksum How to use checksums |
a007e0a076d3cb3f43d39b7092a23d6e19dcbf42ae655d5e203612190c2b3d58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Security for pyinapp-purchase 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.