layerqa / aiocryptopay

https://t.me/CryptoBot api asynchronous python wrapper
https://pypi.org/project/aiocryptopay/
MIT License
79 stars 18 forks source link

can't delete invoice with invoice_id #12

Closed xNeizy closed 6 months ago

xNeizy commented 6 months ago

I use the getMe method to get all my invoices, some I can delete, but one - i can't . I'm sure I'm taking the correct invoice_id, but when deleting it, it tells me that: [400] INVOICE NOT FOUND. INVOICE IS PAID I think it's not the api's fault, but some kind of bug. image

import asyncio
from aiocryptopay import AioCryptoPay, Networks
from config import TEST_CRYPTO_BOT_API

async def main():
    crypto = AioCryptoPay(token=TEST_CRYPTO_BOT_API, network=Networks.TEST_NET)

    delete = await crypto.delete_invoice(invoice_id=169539)
    print(delete)

    await crypto.close()

asyncio.run(main())
layerqa commented 6 months ago

Try to retrieve an invoice using the get_invoices method, and also try to delete it using the delete_invoice method. Please send the traceback and console output.