Реализация работы с invoice

This commit is contained in:
2025-11-02 14:04:51 +03:00
parent 2bb21e4ee4
commit 641b179cd0
2 changed files with 47 additions and 2 deletions
+15 -1
View File
@@ -47,4 +47,18 @@ async def transfer_coins(token, src_username, dst_username, amount):
return await call('api/transfer_coins/', data)
async def get_stats(token):
return await call('api/get_stats/', token)
return await call('api/get_stats/', token)
async def create_invoice(token, dst_username, amount=None):
data = {'token': token, 'dst_username': dst_username}
if amount:
data['amount'] = amount
return await call('api/create_invoice/', data)
async def delete_invoice(token, id):
data = {'token': token, 'id': id}
return await call('api/delete_invoice/', data)
async def get_invoice(token, id):
data = {'token': token, 'id': id}
return await call('api/get_invoice/', data)