Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 2.16 KB

README.md

File metadata and controls

72 lines (50 loc) · 2.16 KB


easypay

Get on pypi Last commit Pip module installs total downloads GitHub stars
Telegram Discord

Installation

Install package with pip:

pip install pyeasypay

or

python3 -m pip install pyeasypay

Example usage

Example on creating invoice and waiting for it to be paid:

from asyncio import run, sleep
from pyeasypay import EasyPay, Provider


async def main():
    cryptobot = Provider(name='cryptobot', api_key='')
    crystalpay = Provider(name='crystalpay', login='', secret='')
    pay = EasyPay(providers=[cryptobot, crystalpay])
    invoice = await pay.create_invoice(15, 'RUB', 'cryptobot')
    
    print(f"Invoice URL: {invoice.pay_info}")
    
    while invoice.status != 'paid':
        await sleep(5)
        await invoice.check()
        
    if invoice.status == 'paid':
        print('Invoice paid! 🎉')
        
if __name__ == '__main__':
    run(main())

Supported providers

List of supported providers:

Provider Status Kwargs for Proiver (* is required)
CryptoBot api_key*, network
CrystalPay login*, secret*
AAIO WIP

Contributors

Contributions are welcomed!

Contributors