conference-website/tickets/urls.py
Anna Sirota ba96ba9937 Support delayed Stripe payments; Invoice PDFs
The following has changed:

* Products have their own /tickets/book/../ URLs
* Products only show up in product table if featured
* Products should link to Stripe prices instead of payment links
* Products have `taxes` field, which is a list of tax rules:
    * this field is used to display VAT lines in invoices
* Tickets store Stripe checkout session data (to too many API calls)
* Ticket page shows Stripe's product image, if available
* Stripe webhook endpoint created, expecting the following events:
    * `checkout.session.completed`
    * `checkout.session.async_payment_succeeded`
    * `payment_intent.requires_action`
    * `charge.refunded`
* Full refund will un-claim everyone who claimed the affected ticket
* Invoice PDFs:
    * with Stripe's bank transfer instructions
    * refund date and amount
* CSV report supports Stripe-paid tickets
* CSV has new columns: VAT and refund
2024-05-27 22:32:15 +02:00

29 lines
1.3 KiB
Python

from django.urls import path
from tickets.views import (
checkout,
invoice,
tickets,
webhooks_saleor,
webhooks_stripe,
)
app_name = 'tickets'
urlpatterns = [
path('tickets/overview/', checkout.ProductsTableView.as_view(), name='products-table'),
path('tickets/book/<str:slug>/', checkout.StripeTicketBuyView.as_view(), name='stripe-buy'),
path('tickets/checkout/done/', checkout.StripeCheckoutDone.as_view(), name='stripe-done'),
path('tickets/<str:sku>/', checkout.TicketBuyView.as_view(), name='buy'),
path(
'tickets/checkout/<str:checkout_token>/', checkout.CheckoutView.as_view(), name='checkout'
),
path('tickets/claim/<str:ticket_token>/', tickets.TicketClaimView.as_view(), name='claim'),
path('<str:edition_path>/tickets/stats/', tickets.tickets_stats, name='stats'),
path('account/ticket/<str:ticket_token>/', tickets.TicketDetailView.as_view(), name='detail'),
path('account/tickets/', tickets.TicketsListView.as_view(), name='list'),
path('webhooks/tickets/order/', webhooks_saleor.OrderUpdated.as_view(), name='webhook-saleor'),
path('webhooks/stripe/', webhooks_stripe.StripeWebhookView.as_view(), name='webhook-stripe'),
path('account/invoice-<str:ticket_token>.pdf', invoice.PDFView.as_view(), name='invoice-pdf'),
]