pyinapp-purchase


Namepyinapp-purchase JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/Michael-Jalloh/pyinapp_purchase
Summarypyinapp_purchase is an open-source Python library designed to simplify and securely validate in-app purchase tokens server side.
upload_time2024-10-27 17:38:19
maintainerNone
docs_urlNone
authorMichael Jalloh
requires_pythonNone
licenseMIT
keywords inapp purchase inapp purchase google inapp purchase
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
```python
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
```python
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
```python
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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Michael-Jalloh/pyinapp_purchase",
    "name": "pyinapp-purchase",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "inapp purchase, inapp, purchase, google inapp purchase",
    "author": "Michael Jalloh",
    "author_email": "michaeljalloh19@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/32/78/43263cd4256224755f5a14aab7f43972dab35789a0de7106595004bc9680/pyinapp_purchase-0.0.5.tar.gz",
    "platform": "any",
    "description": "# pyinapp_purchase\npyinapp_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. \n> Service Account Private Key from Google Cloud is need, as json file.\n\n## Features\n- Seamless Integration: Quickly integrate the validator into existing Python applications.\n- Verification: Handles token verification directly with the Google Play Store API to ensure data authenticity.\n- Consumption: Handles token consumption if token wasn't consume client side.\n- Acknowledgement: Handles token acknowledgement.\n- Error Handling: Provides clear feedback for successful or failed token validations.\n- Lightweight and Performant: Minimal dependencies and optimized for fast, reliable performance.\n\n## Installation\n~~~\npip install pyinapp-purchase\n~~~\n\n## Usage\nverifying purchase\n```python\nfrom google_purchase import GooglePurchaseProduct\n\ngoogle_purchase = GooglePurchaseProduct(\"google api.json\")\n\npackage_name = \"com.example.app\"\nproduct_id = \"first_product\"\npurchase_token = \"token\"\n\ndata = google_purchase.verify_purchase(package_name, product_id, purchase_token)\n\nprint(data)\n```\nconsume purchase\n```python\nfrom google_purchase import GooglePurchaseProduct\n\ngoogle_purchase = GooglePurchaseProduct(\"google api.json\")\n\npackage_name = \"com.example.app\"\nproduct_id = \"first_product\"\npurchase_token = \"token\"\n\ndata = google_purchase.consume_purchase(package_name, product_id, purchase_token)\n\nprint(data)\n```\nacknowledge purchase\n```python\nfrom google_purchase import GooglePurchaseProduct\n\ngoogle_purchase = GooglePurchaseProduct(\"google api.json\")\n\npackage_name = \"com.example.app\"\nproduct_id = \"first_product\"\npurchase_token = \"token\"\n\ndata = google_purchase.acknowledge_purchase(package_name, product_id, purchase_token)\n\nprint(data)\n```\n## Todo\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "pyinapp_purchase is an open-source Python library designed to simplify and securely validate in-app purchase tokens server side.",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/Michael-Jalloh/pyinapp_purchase",
        "issues": "https://github.com/Michael-Jalloh/pyinapp_purchase/issues",
        "source": "https://github.com/Michael-Jalloh/pyinapp_purchase"
    },
    "split_keywords": [
        "inapp purchase",
        " inapp",
        " purchase",
        " google inapp purchase"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a007e0a076d3cb3f43d39b7092a23d6e19dcbf42ae655d5e203612190c2b3d58",
                "md5": "1ce4e1aca17e2913417a979cab4dcc3e",
                "sha256": "edd12c78eb2f497a70c57eefc00c02627974c251c969d1f4d67d4e8702f667e7"
            },
            "downloads": -1,
            "filename": "pyinapp_purchase-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1ce4e1aca17e2913417a979cab4dcc3e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4851,
            "upload_time": "2024-10-27T17:38:18",
            "upload_time_iso_8601": "2024-10-27T17:38:18.166192Z",
            "url": "https://files.pythonhosted.org/packages/a0/07/e0a076d3cb3f43d39b7092a23d6e19dcbf42ae655d5e203612190c2b3d58/pyinapp_purchase-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "327843263cd4256224755f5a14aab7f43972dab35789a0de7106595004bc9680",
                "md5": "38aa7d8bb3df2782d8d0e39e540da41e",
                "sha256": "ad5cfd52ebf2c0834fccd7538776d4f451cce2896061cda7a5ff8076180fcdb6"
            },
            "downloads": -1,
            "filename": "pyinapp_purchase-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "38aa7d8bb3df2782d8d0e39e540da41e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4136,
            "upload_time": "2024-10-27T17:38:19",
            "upload_time_iso_8601": "2024-10-27T17:38:19.631722Z",
            "url": "https://files.pythonhosted.org/packages/32/78/43263cd4256224755f5a14aab7f43972dab35789a0de7106595004bc9680/pyinapp_purchase-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-27 17:38:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Michael-Jalloh",
    "github_project": "pyinapp_purchase",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyinapp-purchase"
}
        
Elapsed time: 0.79037s