Notify users after Tribute payment

This commit is contained in:
Machka Pasla
2025-06-23 23:42:24 +03:00
parent 53464ab25c
commit aa20ac9a18
14 changed files with 445 additions and 37 deletions
+9
View File
@@ -33,6 +33,7 @@ from bot.services.referral_service import ReferralService
from bot.services.promo_code_service import PromoCodeService
from bot.handlers.user import payment as user_payment_webhook_module
from bot.handlers.webhooks import tribute as tribute_webhook_module
class DBSessionMiddleware(BaseMiddleware):
@@ -327,6 +328,14 @@ async def run_bot(settings_param: Settings):
logging.info(
f"YooKassa webhook route configured at: [POST] {yk_path}")
tribute_path = settings_param.tribute_webhook_path
if tribute_path.startswith('/'):
app.router.add_post(
tribute_path,
tribute_webhook_module.tribute_webhook_route)
logging.info(
f"Tribute webhook route configured at: [POST] {tribute_path}")
web_app_runner = web.AppRunner(app)
await web_app_runner.setup()
site = web.TCPSite(web_app_runner,