MayfPayApi is a Python library for interacting with the MayfPay payment system API. It provides methods for retrieving kassa balances, creating and checking invoices.
Project description
MayfPayApi BETA
MayfPayApi is a Python library for interacting with the MayfPay payment system API. It provides methods for retrieving kassa balances, creating and checking invoices.
Installation
You can install MayfPayApi using pip:
pip install mayfpayapi
Usage
Creating an instance of the MayfPayApi class
api = MayfPayApi(api_token="your_api_token", kassa_id=your_kassa_id, public_key="your_public_key", secret_key="your_secret_key")
Calling the get_kassa_balance method
kassa_balance = api.get_kassa_balance()
print(kassa_balance)
Calling the create_invoice method
amount = 100.0
order_id = "your_order_id"
expire_invoice = 3600
payment_method = "your_payment_method"
comment = "your_comment"
data = {"key": "value"}
invoice = api.create_invoice(amount, order_id, expire_invoice, payment_method, comment, data)
print(invoice)
Calling the check_invoice method
order_id = "your_order_id"
invoice_status = api.check_invoice(order_id)
print(invoice_status)
Contributing
Contributions are welcome! Please feel free to submit a pull request.
License
MayfPayApi is released under the MIT License. See LICENSE for more information.
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
mayfpayapi-1.5.1.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for mayfpayapi-1.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b1dcfeeb86ea3587c0b2fe8391f8790592bc37fdfba1b7841361ffd9d3389ac |
|
MD5 | fa4ecfb893fc09c1961ecc6bcea54bf1 |
|
BLAKE2b-256 | 2d7ec137355e14b7a656702708d8b653263907d62037a1e9bdd3263bd1a0cf64 |