minor_fixes
This commit is contained in:
@@ -133,21 +133,21 @@ async def select_tariff_plan(callback_query: CallbackQuery, session: Any):
|
||||
duration_days = int(plan_id) * 30
|
||||
balance = await get_balance(tg_id)
|
||||
|
||||
await save_temporary_data(
|
||||
session,
|
||||
tg_id,
|
||||
"waiting_for_payment",
|
||||
{
|
||||
"plan_id": plan_id,
|
||||
"plan_price": plan_price,
|
||||
"duration_days": duration_days,
|
||||
"required_amount": max(0, plan_price - balance),
|
||||
},
|
||||
)
|
||||
|
||||
if balance < plan_price:
|
||||
required_amount = plan_price - balance
|
||||
|
||||
await save_temporary_data(
|
||||
session,
|
||||
tg_id,
|
||||
"waiting_for_payment",
|
||||
{
|
||||
"plan_id": plan_id,
|
||||
"plan_price": plan_price,
|
||||
"duration_days": duration_days,
|
||||
"required_amount": required_amount,
|
||||
},
|
||||
)
|
||||
|
||||
if USE_NEW_PAYMENT_FLOW == "YOOKASSA":
|
||||
await process_custom_amount_input(callback_query, session)
|
||||
elif USE_NEW_PAYMENT_FLOW == "ROBOKASSA":
|
||||
|
||||
@@ -305,4 +305,4 @@ async def handle_custom_amount_input(message: types.Message | types.CallbackQuer
|
||||
if isinstance(message, types.CallbackQuery):
|
||||
await message.message.answer(error_message)
|
||||
else:
|
||||
await message.answer(error_message)
|
||||
await message.answer(error_message)
|
||||
+1627
-1499
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Reference in New Issue
Block a user