IOKA Asynchronous Python Client Library
Project description
IOKA Asynchronous Python Client Library
Клиент для платежного сервиса IOKA. Позволяет обращаться к API IOKA из кода на Python.
Установка
pip install ioka
Требования
Python 3.7+
Использование
from ioka import IOKA
ioka_client = IOKA('IOKA_SECRET_KEY', 'IOKA_HOST')
При создании клиента задаются параметры: Secret Key и IOKA Host:
SECRET_KEY: для аутентификации.
IOKA_HOST: для выбора среды (тестовый Host & боевой Host).
Обращение к API осуществляется через методы клиента.
from ioka.schemas import RegisterPaymentRequest
data = {
"amount": 3000,
"currency": 398,
"order_id": 322,
"client_id": 1247,
"tr_type": 0,
"email": "client.1247@gmail.com",
"phone": "+7**********",
"back_url": f"https://mywebsite.com/back/",
"callback_url": "https://mywebsite.com/callback/"
}
payment = RegisterPaymentRequest(**data)
ioka_response = await ioka_client.register_payment(payment)
В случае успеха возвращает строку типа URL.
TODO:
Validations
Error response
Async to sync
Signature verification method
Implement rest-aiohttp in more smart way
Update README, add another methods
Document methods
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
Built Distribution
File details
Details for the file ioka-1.1.3.tar.gz
.
File metadata
- Download URL: ioka-1.1.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 045b34e7989a46ee73a15df7a109e5146eee8850ee86f4949c71dcbe72f36fbd |
|
MD5 | 68b700eb0ed0fa590f4d075128a7d9c5 |
|
BLAKE2b-256 | aeed96e488304d66cf7c27d3ad0dd339a9da198e64287c7eaa5c35511d9a217b |
File details
Details for the file ioka-1.1.3-py2.py3-none-any.whl
.
File metadata
- Download URL: ioka-1.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4932feb97159a1be49dd6e8cced947653cf0f9ba6d80020eeca99b99fd3261de |
|
MD5 | 4a8fd098b5badb59d8696ffb5b6a3682 |
|
BLAKE2b-256 | ea71e72a9cb0a94039d11ee432368bf5ee392e282d053d99aaa9a0287a5ec0b8 |