Add public refund creation endpoint and PDF generation
Introduces RefundPublicView for public refund creation via email and invoice/order ID, returning refund info and a base64-encoded PDF slip. Adds RefundCreatePublicSerializer for validation and creation, implements PDF generation in Refund model, and provides a customer-facing HTML template for the return slip. Updates URLs to expose the new endpoint.
This commit is contained in:
@@ -7,6 +7,7 @@ from .views import (
|
||||
ProductImageViewSet,
|
||||
DiscountCodeViewSet,
|
||||
RefundViewSet,
|
||||
RefundPublicView,
|
||||
)
|
||||
|
||||
router = DefaultRouter()
|
||||
@@ -19,6 +20,7 @@ router.register(r'refunds', RefundViewSet, basename='refund')
|
||||
|
||||
urlpatterns = [
|
||||
path('', include(router.urls)),
|
||||
path('refunds/public/', RefundPublicView.as_view(), name='RefundPublicView'),
|
||||
]
|
||||
|
||||
# NOTE: Other endpoints (categories/products/discounts) can be added later
|
||||
|
||||
Reference in New Issue
Block a user