From dc49bef6443b95c8f5cbd454b76129cf9cf33919 Mon Sep 17 00:00:00 2001 From: AGorokhov Date: Sun, 21 Jun 2026 13:22:47 +0300 Subject: [PATCH] Deploy updates --- index.html | 5 +++-- server.py | 19 +++++-------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index 5251d4b..9d2d1ce 100644 --- a/index.html +++ b/index.html @@ -1528,13 +1528,13 @@
-

Заявка успешно оплачена!

+

Оплата успешно завершена!

Спасибо за оплату!
Наш киберспортивный координатор свяжется с вами в ближайшее время, чтобы открыть доступ к материалам и записать на занятие.

@@ -1567,6 +1567,7 @@ // Remove success parameter from URL so it doesn't show again on refresh const newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname; window.history.replaceState({ path: newUrl }, '', newUrl); + window.location.href = '/'; }, 300); } diff --git a/server.py b/server.py index 1ce563a..a4f96cc 100644 --- a/server.py +++ b/server.py @@ -361,17 +361,6 @@ def send_vk_operator_notification(reg_id, data, paid=False): message = ( f"🌐 **Новая активность на сайте ИКП!**\n\n" f"Статус: {status_emoji}\n" - f"🆔 ID заявки: {reg_id}\n" - f"👤 Имя: {data.get('name', '').strip()}\n" - f"📞 Телефон: {data.get('phone', '').strip()}\n" - f"✉️ E-mail: {data.get('email', '').strip()}\n" - f"🌐 Профиль VK: {data.get('vk', '').strip()}\n" - f"🏆 Услуга: {data.get('serviceName', '').strip()}\n" - f"💰 Сумма: {data.get('servicePrice', '')} ₽\n\n" - f"⚖️ Согласия пользователя:\n" - f"• Оферта: {'Да' if data.get('agreeOferta') else 'Нет'}\n" - f"• Политика ПД: {'Да' if data.get('agreePolicy') else 'Нет'}\n" - f"• Рассылка: {'Да' if data.get('agreeNewsletter') else 'Нет'}\n" ) vk.messages.send( @@ -379,9 +368,8 @@ def send_vk_operator_notification(reg_id, data, paid=False): message=message, random_id=get_random_id() ) - print(f"[VK NOTIFICATION] Отправлено уведомление оператору (ID: {operator_id}) для {reg_id}.") except Exception as e: - print(f"[VK NOTIFICATION] Ошибка при отправке уведомления в VK: {e}") + print(f"[VK] Ошибка отправки уведомления: {e}") def send_email_notification(reg_id, data, paid=False): """Send SMTP email notification.""" @@ -390,7 +378,10 @@ def send_email_notification(reg_id, data, paid=False): smtp_user = config.SMTP_USER smtp_password = config.SMTP_PASSWORD smtp_from = config.SMTP_FROM or smtp_user - smtp_to = config.SMTP_TO or smtp_user + smtp_to_raw = config.SMTP_TO or smtp_user + smtp_to = [email.strip() for email in smtp_to_raw.split(',')] + + print(f"[SMTP] Настройки: Server={smtp_server}, Port={smtp_port}, User={smtp_user}, To={smtp_to}") if not smtp_server or not smtp_user or not smtp_password: print("[SMTP] Пропущено: параметры SMTP не заполнены в .env")