Remove unused __init__.py file and update payment handler callback buttons to unify navigation. Change "back_to_profile" callback to "pay" in multiple payment processing files for consistency.

This commit is contained in:
Zakhar Izmaylov
2024-11-24 22:35:43 +03:00
parent 708b0be31f
commit dc7da4441a
6 changed files with 5 additions and 10 deletions
View File
+1 -6
View File
@@ -42,12 +42,7 @@ async def create_trial_key(tg_id: int, session: Any):
)
await store_key(
tg_id,
client_id,
email,
expiry_timestamp,
public_link,
server_id=least_loaded_cluster,
tg_id, client_id, email, expiry_timestamp, public_link, server_id=least_loaded_cluster, session=session
)
await use_trial(tg_id, session)
return result
+1 -1
View File
@@ -54,7 +54,7 @@ async def process_callback_pay_cryptobot(callback_query: types.CallbackQuery, st
callback_data="enter_custom_amount_crypto",
)
)
builder.row(InlineKeyboardButton(text="⬅️ Назад", callback_data="back_to_profile"))
builder.row(InlineKeyboardButton(text="⬅️ Назад", callback_data="pay"))
key_count = await get_key_count(callback_query.message.chat.id)
if key_count == 0:
exists = await check_connection_exists(callback_query.message.chat.id)
+1 -1
View File
@@ -110,7 +110,7 @@ async def process_callback_pay_freekassa(callback_query: types.CallbackQuery, st
callback_data="enter_custom_amount_freekassa",
)
)
builder.row(InlineKeyboardButton(text="⬅️ Назад", callback_data="back_to_profile"))
builder.row(InlineKeyboardButton(text="⬅️ Назад", callback_data="pay"))
await callback_query.message.answer(
text="Выберите сумму пополнения через FreeKassa:",
+1 -1
View File
@@ -79,7 +79,7 @@ async def process_callback_pay_robokassa(callback_query: types.CallbackQuery, st
callback_data="enter_custom_amount_robokassa",
)
)
builder.row(InlineKeyboardButton(text="⬅️ Назад", callback_data="back_to_profile"))
builder.row(InlineKeyboardButton(text="⬅️ Назад", callback_data="pay"))
key_count = await get_key_count(tg_id)
+1 -1
View File
@@ -61,7 +61,7 @@ async def process_callback_pay_yookassa(callback_query: types.CallbackQuery, sta
callback_data="enter_custom_amount_yookassa",
)
)
builder.row(InlineKeyboardButton(text="👤 Личный кабинет", callback_data="profile"))
builder.row(InlineKeyboardButton(text="⬅️ Назад", callback_data="pay"))
key_count = await get_key_count(tg_id)