From 34feb87b0a64a456f3cfeb88974be2b42e0846b1 Mon Sep 17 00:00:00 2001 From: Vladless Date: Fri, 13 Jun 2025 12:09:49 +0300 Subject: [PATCH] fix custom amount for robokassa --- handlers/keys/key_mode/key_create.py | 2 +- handlers/keys/key_renew.py | 2 +- handlers/payments/robokassa_pay.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/handlers/keys/key_mode/key_create.py b/handlers/keys/key_mode/key_create.py index 5dbd2dc5..b2d4174e 100644 --- a/handlers/keys/key_mode/key_create.py +++ b/handlers/keys/key_mode/key_create.py @@ -164,7 +164,7 @@ async def select_tariff_plan( if USE_NEW_PAYMENT_FLOW == "YOOKASSA": await process_custom_amount_input(callback_query, session) elif USE_NEW_PAYMENT_FLOW == "ROBOKASSA": - await handle_custom_amount_input(callback_query, session) + await handle_custom_amount_input(message=callback_query, session=session) elif USE_NEW_PAYMENT_FLOW == "STARS": await process_custom_amount_input_stars(callback_query, session) elif USE_NEW_PAYMENT_FLOW == "YOOMONEY": diff --git a/handlers/keys/key_renew.py b/handlers/keys/key_renew.py index 18c2a9ed..95352a19 100644 --- a/handlers/keys/key_renew.py +++ b/handlers/keys/key_renew.py @@ -205,7 +205,7 @@ async def process_callback_renew_plan(callback_query: CallbackQuery, session: An if USE_NEW_PAYMENT_FLOW == "YOOKASSA": await process_custom_amount_input(callback_query, session) elif USE_NEW_PAYMENT_FLOW == "ROBOKASSA": - await handle_custom_amount_input(callback_query, session) + await handle_custom_amount_input(message=callback_query, session=session) elif USE_NEW_PAYMENT_FLOW == "STARS": await process_custom_amount_input_stars(callback_query, session) elif USE_NEW_PAYMENT_FLOW == "YOOMONEY": diff --git a/handlers/payments/robokassa_pay.py b/handlers/payments/robokassa_pay.py index f5c6670a..4c0bd694 100644 --- a/handlers/payments/robokassa_pay.py +++ b/handlers/payments/robokassa_pay.py @@ -309,7 +309,7 @@ async def handle_custom_amount_input( await edit_or_send_message( target_message=target_message, text="Данные для оплаты не найдены. Попробуйте снова.", - reply_markup=types.InlineKeyboardMarkup(), + reply_markup=types.InlineKeyboardMarkup(inline_keyboard=[]), ) return @@ -320,7 +320,7 @@ async def handle_custom_amount_input( await edit_or_send_message( target_message=target_message, text="Недостаточная сумма для пополнения.", - reply_markup=types.InlineKeyboardMarkup(), + reply_markup=types.InlineKeyboardMarkup(inline_keyboard=[]), ) return @@ -339,7 +339,7 @@ async def handle_custom_amount_input( await edit_or_send_message( target_message=target_message, text="Некорректное состояние данных. Попробуйте снова.", - reply_markup=types.InlineKeyboardMarkup(), + reply_markup=types.InlineKeyboardMarkup(inline_keyboard=[]), ) return @@ -357,5 +357,5 @@ async def handle_custom_amount_input( await edit_or_send_message( target_message=target_message, text="Произошла ошибка при создании платежа. Попробуйте позже.", - reply_markup=types.InlineKeyboardMarkup(), + reply_markup=types.InlineKeyboardMarkup(inline_keyboard=[]), )