Files
booking_backend/payment/admin.py
2026-04-10 20:51:43 -05:00

20 lines
755 B
Python

from django.contrib import admin
from .models import PaymentRecord, WebhookEvent
@admin.register(PaymentRecord)
class PaymentRecordAdmin(admin.ModelAdmin):
list_display = ("id", "booking", "stripe_payment_intent_id", "amount", "currency", "status", "created_at")
list_filter = ("status", "currency")
search_fields = ("stripe_payment_intent_id", "stripe_charge_id", "booking__id")
readonly_fields = ("created_at", "updated_at")
@admin.register(WebhookEvent)
class WebhookEventAdmin(admin.ModelAdmin):
list_display = ("stripe_event_id", "event_type", "processed", "processed_at", "created_at")
list_filter = ("processed", "event_type")
search_fields = ("stripe_event_id", "event_type")
readonly_fields = ("created_at",)