Phase 3 & Phase 4 - Completed
This commit is contained in:
@@ -15,6 +15,22 @@ from igny8_core.modules.billing.views import (
|
||||
CreditTransactionViewSet,
|
||||
AIModelConfigViewSet,
|
||||
)
|
||||
# Payment gateway views
|
||||
from .views.stripe_views import (
|
||||
StripeConfigView,
|
||||
StripeCheckoutView,
|
||||
StripeCreditCheckoutView,
|
||||
StripeBillingPortalView,
|
||||
stripe_webhook,
|
||||
)
|
||||
from .views.paypal_views import (
|
||||
PayPalConfigView,
|
||||
PayPalCreateOrderView,
|
||||
PayPalCreateSubscriptionOrderView,
|
||||
PayPalCaptureOrderView,
|
||||
PayPalCreateSubscriptionView,
|
||||
paypal_webhook,
|
||||
)
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register(r'admin', BillingViewSet, basename='billing-admin')
|
||||
@@ -35,4 +51,19 @@ urlpatterns = [
|
||||
path('', include(router.urls)),
|
||||
# User-facing usage summary endpoint for plan limits
|
||||
path('usage-summary/', get_usage_summary, name='usage-summary'),
|
||||
|
||||
# Stripe endpoints
|
||||
path('stripe/config/', StripeConfigView.as_view(), name='stripe-config'),
|
||||
path('stripe/checkout/', StripeCheckoutView.as_view(), name='stripe-checkout'),
|
||||
path('stripe/credit-checkout/', StripeCreditCheckoutView.as_view(), name='stripe-credit-checkout'),
|
||||
path('stripe/billing-portal/', StripeBillingPortalView.as_view(), name='stripe-billing-portal'),
|
||||
path('webhooks/stripe/', stripe_webhook, name='stripe-webhook'),
|
||||
|
||||
# PayPal endpoints
|
||||
path('paypal/config/', PayPalConfigView.as_view(), name='paypal-config'),
|
||||
path('paypal/create-order/', PayPalCreateOrderView.as_view(), name='paypal-create-order'),
|
||||
path('paypal/create-subscription-order/', PayPalCreateSubscriptionOrderView.as_view(), name='paypal-create-subscription-order'),
|
||||
path('paypal/capture-order/', PayPalCaptureOrderView.as_view(), name='paypal-capture-order'),
|
||||
path('paypal/create-subscription/', PayPalCreateSubscriptionView.as_view(), name='paypal-create-subscription'),
|
||||
path('webhooks/paypal/', paypal_webhook, name='paypal-webhook'),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user