From f186fca0f1aa9bbe5eab7613f229df527b2ab774 Mon Sep 17 00:00:00 2001 From: Tolmachev Igor Date: Mon, 20 Apr 2026 19:11:21 +0300 Subject: Add payments command --- models/callback_data.py | 9 +++++++++ models/payment.py | 3 +++ 2 files changed, 12 insertions(+) (limited to 'models') diff --git a/models/callback_data.py b/models/callback_data.py index f9c9a26..5ee38bd 100644 --- a/models/callback_data.py +++ b/models/callback_data.py @@ -28,3 +28,12 @@ class InvoicePageClb(CallbackData, prefix="invoice.p"): class InvoiceItemClb(CallbackData, prefix="invoice.i"): page: int invoice_id: int + + +class PaymentPageClb(CallbackData, prefix="payment.p"): + page: int + + +class PaymentItemClb(CallbackData, prefix="payment.i"): + page: int + payment_id: int diff --git a/models/payment.py b/models/payment.py index afae642..ea61817 100644 --- a/models/payment.py +++ b/models/payment.py @@ -23,18 +23,21 @@ class ReceiptFile(BaseModel): self, bot: Bot, user_id: int, + caption: str | None = None, reply_markup: ReplyMarkupUnion | None = None, ) -> Message: if self.type == ReceiptFileType.DOCUMENT: return await bot.send_document( user_id, document=self.file_id, + caption=caption, reply_markup=reply_markup, ) else: return await bot.send_photo( user_id, photo=self.file_id, + caption=caption, reply_markup=reply_markup, ) -- cgit v1.3