Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions backend/subscription/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ def create_payment(subscription, description):
},
"confirmation": {
"type": "redirect",
"return_url": f"https://{SERVER_HOST}/payment_return_page/?subscription_id={subscription.subscription_id}"
# todo: return url
"return_url": f"https://{SERVER_HOST}/payment/return/",
},
"capture": True,
"description": description,
Expand Down
3 changes: 2 additions & 1 deletion backend/subscription/urls.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from django.urls import path

from subscription.views import SubscriptionView, WebhookHandler, UserSubscriptionStatus
from django.views.generic import TemplateView

urlpatterns = [
path('subscription/manage/', SubscriptionView.as_view(), name='manage_subscription'),
path('subscription/webhook/', WebhookHandler.as_view(), name='yookassa_webhook'),
path('subscription/status/', UserSubscriptionStatus.as_view(), name='subscription_status'),

path('payment/return/', TemplateView.as_view(template_name='payment/payment_return_page.html'), name='payment_return_page'),
]
70 changes: 70 additions & 0 deletions backend/templates/payment/payment_return_page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{% load static %}
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Оплата прошла успешно</title>
<style>
body {
background-color: #FFF3DC;
font-family: sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
text-align: center;
}
.container {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
max-width: 400px;
width: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
p {
color: #444444;
font-size: 16px;
margin: 0;
}
#logo {
width: 100%;
max-width: 360px;
height: auto;
padding: 10px; /* Добавляем внутренний отступ вокруг логотипа */
}
#logo svg {
width: 100%;
height: auto;
}
@media (max-width: 600px) {
.container {
max-width: 90%;
padding: 15px;
}
p {
font-size: 14px;
}
#logo {
max-width: 270px;
padding: 8px; /* Уменьшаем отступ на мобильных для баланса */
}
}
</style>
</head>
<body>
<div class="container">
<div id="logo">
{% include 'dashboard/res/logo.svg' %}
</div>
<p>Вы можете вернуться в приложение.</p>
</div>
</body>
</html>