Remove tribute auto renew and add admin notifications

This commit is contained in:
Machka Pasla
2025-07-06 13:31:04 +07:00
parent 07cb68457f
commit df987fc52a
7 changed files with 69 additions and 82 deletions
+10
View File
@@ -20,6 +20,7 @@ from bot.services.panel_api_service import PanelApiService
from bot.services.yookassa_service import YooKassaService
from bot.middlewares.i18n import JsonI18n
from config.settings import Settings
from bot.services.notification_service import notify_admin_new_payment
payment_processing_lock = asyncio.Lock()
@@ -175,6 +176,15 @@ async def process_successful_payment(session: AsyncSession, bot: Bot,
f"Failed to send final payment success message to user {user_id}: {e_notify}"
)
await notify_admin_new_payment(
bot,
settings,
i18n,
user_id,
subscription_months,
payment_value,
)
except Exception as e_process:
logging.error(
f"Error during process_successful_payment main try block for user {user_id}: {e_process}",