inital commit
This commit is contained in:
19
payment/admin.py
Normal file
19
payment/admin.py
Normal file
@@ -0,0 +1,19 @@
|
||||
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",)
|
||||
Reference in New Issue
Block a user