feat(rw): remnawave integration

This commit is contained in:
2026-08-03 00:01:00 +07:00
parent 97a4e819d6
commit 1e4cb43ac7
10 changed files with 640 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
from datetime import UTC, datetime
import math
from datetime import UTC, datetime
from fastapi import APIRouter, Depends, HTTPException
from sqlalchemy.ext.asyncio import AsyncSession
@@ -61,12 +61,11 @@ async def checkout(
amount=amount_to_pay,
status=InvoiceStatus.ACTIVE,
)
with open("log.txt", "w") as f:
f.write(
" ".join((str(price), str(amount_to_pay), cfg.pally_shop_id, str(order_entry.id)))
)
bill = await pally.bills.create(
float(amount_to_pay), cfg.pally_shop_id, order_id=str(order_entry.id)
amount=float(amount_to_pay),
shop_id=cfg.pally_shop_id,
order_id=str(order_entry.id),
)
payment_link = bill.link_page_url
if not payment_link: