20 lines
755 B
Python
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",)
|