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.2.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for mayfpayapi-1.5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c401360db3cd57078acddb52593a8f608df404155a8d25dc668296ad2fa01127 |
|
MD5 | 7ba18e25b6bde2543a0dff423882fa12 |
|
BLAKE2b-256 | c58ed0e24b403b6767b306dc0d1096016b55ed638d32ec6fa5595647a43943a0 |