Commit Graph

30 Commits

Author SHA1 Message Date
Fringg b40a812f3a fix: fix Platega and CryptoBot webhook verification
Platega: handle verification ping POST without auth headers (empty body → 200 OK)
CryptoBot: always use API token for signature verification per docs, not WEBHOOK_SECRET
CryptoBot: reject requests without signature in both FastAPI and aiohttp handlers
Remove dead self.webhook_secret from CryptoBotService
Update tests to match new behavior
2026-03-18 20:11:55 +03:00
Fringg 1f0fef114b refactor: complete structlog migration with contextvars, kwargs, and logging hardening
- Add ContextVarsMiddleware for automatic user_id/chat_id/username binding
  via structlog contextvars (aiogram) and http_method/http_path (FastAPI)
- Use bound_contextvars() context manager instead of clear_contextvars()
  to safely restore previous state instead of wiping all context
- Register ContextVarsMiddleware as outermost middleware (before GlobalError)
  so all error logs include user context
- Replace structlog.get_logger() with structlog.get_logger(__name__) across
  270 calls in 265 files for meaningful logger names
- Switch wrapper_class from BoundLogger to make_filtering_bound_logger()
  for pre-processor level filtering (performance optimization)
- Migrate 1411 %-style positional arg logger calls to structlog kwargs
  style across 161 files via AST script
- Migrate log_rotation_service.py from stdlib logging to structlog
- Add payment module prefixes to TelegramNotifierProcessor.IGNORED_LOGGER_PREFIXES
  and ExcludePaymentFilter.PAYMENT_MODULES to prevent payment data leaking
  to Telegram notifications and general log files
- Fix LoggingMiddleware: add from_user null-safety for channel posts,
  switch time.time() to time.monotonic() for duration measurement
- Remove duplicate logger assignments in purchase.py, config.py,
  inline.py, and admin/payments.py
2026-02-16 09:18:12 +03:00
c0mrade 9a2aea038a chore: add uv package manager and ruff linter configuration
- Add pyproject.toml with uv and ruff configuration
- Pin Python version to 3.13 via .python-version
- Add Makefile commands: lint, format, fix
- Apply ruff formatting to entire codebase
- Remove unused imports (base64 in yookassa/simple_subscription)
- Update .gitignore for new config files
2026-01-24 17:45:27 +03:00
Egor 879650c2e4 Update webhook_server.py 2026-01-09 13:11:40 +03:00
Egor 2c8e67ac82 Implement Freekassa webhook handler
Added support for Freekassa webhook handling and logging.
2026-01-06 20:59:38 +03:00
Egor 0c93516056 feat: make MulenPay display name configurable 2025-10-19 01:55:10 +03:00
Egor 89b0544f86 Revert "Revert "Revert "Complete Wata Pay integration""" 2025-10-14 21:17:54 +03:00
Egor 7ed635600e Revert "Revert "Complete Wata Pay integration"" 2025-10-14 19:14:28 +03:00
Egor 5a4f59dfb2 Revert "Complete Wata Pay integration" 2025-10-14 19:13:11 +03:00
Egor d3dd423042 Complete Wata Pay integration 2025-10-14 16:46:00 +03:00
Egor 7493b13348 Allow configuring YooKassa webhook host 2025-10-07 06:32:03 +03:00
Legacyyy777 e480356447 Оптимизирована обработка подключения к БД в WebhookServer. Удален цикл async for, добавлена обработка исключений при получении соединения с БД. 2025-10-04 09:21:49 +05:00
Legacyyy777 96b64df989 Добавлен return после цикла async for db in get_db().
Добавлена обработка случая, когда не удается получить соединение с БД.
2025-10-04 02:32:04 +05:00
Legacyyy777 b68f1256ca Добавлено логирование заголовков вебхука Mulen Pay для отладки и временно отключена проверка подписи. Обновлены сообщения логирования для улучшения диагностики. 2025-10-03 10:28:02 +05:00
Egor 2b4136faa7 Handle additional MulenPay webhook signature formats 2025-09-30 23:57:18 +03:00
Egor 588e4acbd3 Secure Mulen Pay webhook with signature validation 2025-09-24 01:29:42 +03:00
Egor eb730ecd6e Add Mulen Pay integration for balance top-ups 2025-09-24 01:14:15 +03:00
Egor a1c2907cce Update webhook_server.py 2025-09-09 08:56:15 +03:00
Egor eeca712a3e Update webhook_server.py 2025-09-09 06:48:30 +03:00
Egor c23a777783 Update webhook_server.py 2025-09-09 06:32:10 +03:00
yazhog adf509dc81 chore: require Tribute signature 2025-09-06 23:11:18 +03:00
yazhog 22f5fc43dd feat(tribute): verify webhook signature 2025-09-06 23:02:57 +03:00
Egor 03be071edc Update webhook_server.py 2025-08-30 23:54:27 +03:00
Egor 3d7727dbf2 Update webhook_server.py 2025-08-30 23:46:31 +03:00
Egor 015726b3a6 Update webhook_server.py 2025-08-30 23:35:20 +03:00
Egor b09b7a0c84 Add files via upload 2025-08-30 23:21:04 +03:00
Egor b21fce0eff Update webhook_server.py 2025-08-30 19:23:58 +03:00
Egor 017aa27c0f Update webhook_server.py 2025-08-30 19:17:31 +03:00
Egor 0ce4ce2b08 Update webhook_server.py 2025-08-30 18:43:32 +03:00
Egor 736e4c6cae NEW VERSION
NEW VERSION
2025-08-20 23:57:04 +03:00