Ilo/apps/payments/api/urls.py
2026-05-02 20:01:30 +03:30

28 lines
818 B
Python

from django.urls import path
from .preview import CheckoutPreviewView
from .views import (
CheckoutView,
GatewayCallbackView,
InstructorSalesView,
MyOrderDetailView,
MyOrdersView,
)
urlpatterns = [
path("courses/<slug:slug>/checkout/", CheckoutView.as_view(), name="checkout"),
path(
"courses/<slug:slug>/checkout/preview/",
CheckoutPreviewView.as_view(),
name="checkout-preview",
),
path(
"payments/callback/<str:gateway>/",
GatewayCallbackView.as_view(),
name="payment-callback",
),
path("me/orders/", MyOrdersView.as_view(), name="my-orders"),
path("me/orders/<int:pk>/", MyOrderDetailView.as_view(), name="my-order-detail"),
path("instructor/orders/", InstructorSalesView.as_view(), name="instructor-orders"),
]