diff --git a/api/v2/routes/auth/session.py b/api/v2/routes/auth/session.py index f8fb394d..3d28fa05 100644 --- a/api/v2/routes/auth/session.py +++ b/api/v2/routes/auth/session.py @@ -242,6 +242,7 @@ async def auth_summary( class MyPaymentItem(BaseModel): id: int + payment_id: str | None amount: float currency: str status: str @@ -288,6 +289,7 @@ async def my_payments( items.append( MyPaymentItem( id=int(p.id), + payment_id=str(p.payment_id) if p.payment_id else None, amount=float(p.amount or 0), currency=str(p.currency or "RUB"), status=str(p.status or ""), @@ -345,11 +347,12 @@ async def get_my_payment_invoice( status_label = "ОПЛАЧЕН" if status_norm in {"completed", "success", "paid"} else "ОЖИДАЕТ" if status_norm in {"pending", "processing"} else "ОТКЛОНЁН" provider = str(payment.payment_system or "").upper() or "—" user_label = identity.email or (f"tg · {identity.tg_id}" if identity.tg_id else identity.id) + payment_identifier = str(payment.payment_id or payment.id) html = f"""
-