Implement cancelling subscriptions

This commit is contained in:
2022-07-21 13:50:45 +01:00
parent db87a138f2
commit d40557bbba
7 changed files with 77 additions and 41 deletions

View File

@@ -43,3 +43,4 @@ STRIPE_PUBLIC_API_KEY_PROD = "pk_prod_xxx"
STRIPE_ENDPOINT_SECRET = ""
STATIC_ROOT = ""
SECRET_KEY = "a"

View File

@@ -20,7 +20,7 @@ from django.urls import include, path
from django.views.generic import TemplateView
from core.ui.views.drilldown import Drilldown
from core.views import Billing, Home, Order, Portal, Signup
from core.views import Billing, Cancel, Home, Order, Portal, Signup
from core.views.callbacks import Callback
from core.views.charts import SentimentChartJSONView, VolumeChartJSONView
@@ -29,6 +29,11 @@ urlpatterns = [
path("callback", Callback.as_view(), name="callback"),
path("billing/", Billing.as_view(), name="billing"),
path("order/<str:plan_name>/", Order.as_view(), name="order"),
path(
"cancel_subscription/<str:plan_name>/",
Cancel.as_view(),
name="cancel_subscription",
),
path(
"success/", TemplateView.as_view(template_name="success.html"), name="success"
),