21 lines
877 B
Python
21 lines
877 B
Python
from django.contrib import admin
|
|
from .models import GoPayPayment, GoPayRefund, GoPaySubscription
|
|
|
|
@admin.register(GoPayPayment)
|
|
class GoPayPaymentAdmin(admin.ModelAdmin):
|
|
list_display = ("gopay_id", "status", "amount", "currency", "user", "created_at")
|
|
search_fields = ("gopay_id", "order_number", "status")
|
|
list_filter = ("status", "currency", "preauthorized")
|
|
|
|
@admin.register(GoPayRefund)
|
|
class GoPayRefundAdmin(admin.ModelAdmin):
|
|
list_display = ("payment", "gopay_refund_id", "amount", "status", "created_at")
|
|
search_fields = ("gopay_refund_id", "payment__gopay_id")
|
|
list_filter = ("status",)
|
|
|
|
@admin.register(GoPaySubscription)
|
|
class GoPaySubscriptionAdmin(admin.ModelAdmin):
|
|
list_display = ("parent_payment", "recurrence_id", "status", "canceled", "created_at")
|
|
search_fields = ("recurrence_id", "parent_payment__gopay_id")
|
|
list_filter = ("status", "canceled")
|