Deploy updates
This commit is contained in:
+3
-2
@@ -1528,13 +1528,13 @@
|
|||||||
<div class="w-16 h-16 bg-emerald-500/10 border border-emerald-500/30 text-emerald-400 rounded-full flex items-center justify-center text-3xl font-bold mx-auto shadow-[0_0_15px_rgba(16,185,129,0.2)]">
|
<div class="w-16 h-16 bg-emerald-500/10 border border-emerald-500/30 text-emerald-400 rounded-full flex items-center justify-center text-3xl font-bold mx-auto shadow-[0_0_15px_rgba(16,185,129,0.2)]">
|
||||||
✓
|
✓
|
||||||
</div>
|
</div>
|
||||||
<h2 class="font-display font-black text-2xl text-white uppercase tracking-wider">Заявка успешно оплачена!</h2>
|
<h2 class="font-display font-black text-2xl text-white uppercase tracking-wider">Оплата успешно завершена!</h2>
|
||||||
<p class="text-sm text-slate-300 leading-relaxed">
|
<p class="text-sm text-slate-300 leading-relaxed">
|
||||||
Спасибо за оплату!<br>
|
Спасибо за оплату!<br>
|
||||||
Наш киберспортивный координатор свяжется с вами в ближайшее время, чтобы открыть доступ к материалам и записать на занятие.
|
Наш киберспортивный координатор свяжется с вами в ближайшее время, чтобы открыть доступ к материалам и записать на занятие.
|
||||||
</p>
|
</p>
|
||||||
<button onclick="closeSuccessModal()" class="w-full py-3 bg-purple-600 hover:bg-purple-500 text-white font-display font-black text-xs uppercase tracking-wider rounded-xl shadow-lg shadow-purple-600/20 hover:shadow-purple-600/40 transform hover:-translate-y-0.5 transition duration-200">
|
<button onclick="closeSuccessModal()" class="w-full py-3 bg-purple-600 hover:bg-purple-500 text-white font-display font-black text-xs uppercase tracking-wider rounded-xl shadow-lg shadow-purple-600/20 hover:shadow-purple-600/40 transform hover:-translate-y-0.5 transition duration-200">
|
||||||
Закрыть
|
На главную
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1567,6 +1567,7 @@
|
|||||||
// Remove success parameter from URL so it doesn't show again on refresh
|
// Remove success parameter from URL so it doesn't show again on refresh
|
||||||
const newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
const newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
||||||
window.history.replaceState({ path: newUrl }, '', newUrl);
|
window.history.replaceState({ path: newUrl }, '', newUrl);
|
||||||
|
window.location.href = '/';
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -361,17 +361,6 @@ def send_vk_operator_notification(reg_id, data, paid=False):
|
|||||||
message = (
|
message = (
|
||||||
f"🌐 **Новая активность на сайте ИКП!**\n\n"
|
f"🌐 **Новая активность на сайте ИКП!**\n\n"
|
||||||
f"Статус: {status_emoji}\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(
|
vk.messages.send(
|
||||||
@@ -379,9 +368,8 @@ def send_vk_operator_notification(reg_id, data, paid=False):
|
|||||||
message=message,
|
message=message,
|
||||||
random_id=get_random_id()
|
random_id=get_random_id()
|
||||||
)
|
)
|
||||||
print(f"[VK NOTIFICATION] Отправлено уведомление оператору (ID: {operator_id}) для {reg_id}.")
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"[VK NOTIFICATION] Ошибка при отправке уведомления в VK: {e}")
|
print(f"[VK] Ошибка отправки уведомления: {e}")
|
||||||
|
|
||||||
def send_email_notification(reg_id, data, paid=False):
|
def send_email_notification(reg_id, data, paid=False):
|
||||||
"""Send SMTP email notification."""
|
"""Send SMTP email notification."""
|
||||||
@@ -390,7 +378,10 @@ def send_email_notification(reg_id, data, paid=False):
|
|||||||
smtp_user = config.SMTP_USER
|
smtp_user = config.SMTP_USER
|
||||||
smtp_password = config.SMTP_PASSWORD
|
smtp_password = config.SMTP_PASSWORD
|
||||||
smtp_from = config.SMTP_FROM or smtp_user
|
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:
|
if not smtp_server or not smtp_user or not smtp_password:
|
||||||
print("[SMTP] Пропущено: параметры SMTP не заполнены в .env")
|
print("[SMTP] Пропущено: параметры SMTP не заполнены в .env")
|
||||||
|
|||||||
Reference in New Issue
Block a user