https://github.com/youknowone/itunes-iap
Apple iTunes In-app purchase verification tool
https://github.com/youknowone/itunes-iap
itunes pypi python
Last synced: 7 months ago
JSON representation
Apple iTunes In-app purchase verification tool
- Host: GitHub
- URL: https://github.com/youknowone/itunes-iap
- Owner: youknowone
- License: other
- Created: 2013-01-10T15:02:42.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2022-06-05T05:06:11.000Z (over 3 years ago)
- Last Synced: 2024-04-29T13:02:39.360Z (over 1 year ago)
- Topics: itunes, pypi, python
- Language: Python
- Homepage: http://itunes-iap.readthedocs.io
- Size: 180 KB
- Stars: 136
- Watchers: 9
- Forks: 50
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
itunes-iap v2
~~~~~~~~~~~~~Python 2 & 3 compatible! Even with :mod:`asyncio` support!
.. image:: https://travis-ci.org/youknowone/itunes-iap.svg?branch=master
:target: https://travis-ci.org/youknowone/itunes-iap
.. image:: https://coveralls.io/repos/github/youknowone/itunes-iap/badge.svg?branch=master
:target: https://coveralls.io/github/youknowone/itunes-iap?branch=master- Source code: ``_
- Documentation: ``_
- Distribution: ``_Quickstart
----------Create request to create a request to itunes verifying api.
.. sourcecode:: python
>>> import itunesiap
>>> try:
>>> response = itunesiap.verify(raw_data) # base64-encoded data
>>> except itunesiap.exc.InvalidReceipt as e:
>>> print('invalid receipt')
>>> print response.receipt.last_in_app.product_id # other values are also available as property!The common attributes are:
`product_id`, `original_transaction_id` and `quantity`.See the full document in:
- :func:`itunesiap.verify`: The verifying function.
- :class:`itunesiap.receipt.Receipt`: The receipt object.asyncio
-------.. sourcecode:: python
>>> import itunesiap
>>> response = await itunesiap.aioverify(raw_data) # verify -> aioverifyThe other parts are the same.
See the full document in:
- :func:`itunesiap.aioverify`: The verifying function.Installation
------------PyPI is the recommended way.
.. sourcecode:: shell
$ pip install itunes-iap
To browse versions and tarballs, visit:
``_Apple in-review mode
--------------------In review mode, your actual users who use older versions want to verify in
production server but the reviewers in Apple office want to verify in sandbox
server.Note: The default env is `production` mode which doesn't allow any sandbox
verifications.You can change the verifying mode by specifying `env`.
.. sourcecode:: python
>>> # review mode
>>> itunesiap.verify(raw_data, env=itunesiap.env.review)Note for v1 users
-----------------There was breaking changes between v1 and v2 APIs.
- Specify version `0.6.6` for latest v1 API when you don't need new APIs.
- Or use `import itunesiap.legacy as itunesiap` instead of `import itunesiap`. (`from itunesiap import xxx` to `from itunesiap.legacy import xxx`)Contributors
------------See https://github.com/youknowone/itunes-iap/graphs/contributors