summaryrefslogtreecommitdiff
path: root/postgresqleu/adyen/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'postgresqleu/adyen/admin.py')
-rw-r--r--postgresqleu/adyen/admin.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/postgresqleu/adyen/admin.py b/postgresqleu/adyen/admin.py
index 2b159173..d3e1a4a8 100644
--- a/postgresqleu/adyen/admin.py
+++ b/postgresqleu/adyen/admin.py
@@ -5,6 +5,7 @@ from django.urls import reverse
from models import RawNotification, Notification
from models import Report, TransactionStatus, AdyenLog, Refund
+
class RawNotificationAdmin(admin.ModelAdmin):
list_display = ('dat', 'confirmed',)
readonly_fields = ('notification_link', )
@@ -16,6 +17,7 @@ class RawNotificationAdmin(admin.ModelAdmin):
return mark_safe('<a href="%s">%s</a>' % (url, n))
notification_link.short_description = 'Notification'
+
class NotificationAdmin(admin.ModelAdmin):
list_display = ('receivedat', 'eventDate', 'merchantAccountCode', 'eventCode', 'live', 'success', 'confirmed', 'pspReference', )
readonly_fields = ('rawnotification_link',)
@@ -27,9 +29,11 @@ class NotificationAdmin(admin.ModelAdmin):
return mark_safe('<a href="%s">%s</a>' % (url, obj))
rawnotification_link.short_description = 'Rawnotification'
+
class ReportAdmin(admin.ModelAdmin):
list_display = ('receivedat', 'downloadedat', 'processedat', 'url',)
+
class TransactionStatusAdmin(admin.ModelAdmin):
list_display = ('pspReference', 'amount', 'settledamount', 'authorizedat', 'capturedat', 'settledat', 'method', 'refund')
readonly_fields = ('notification_link', 'refund_link', )
@@ -50,6 +54,7 @@ class TransactionStatusAdmin(admin.ModelAdmin):
return "Not refunded"
refund_link.short_description = 'Refund'
+
class RefundAdmin(admin.ModelAdmin):
list_display = ('notification', 'receivedat', 'transaction', 'refund_amount')
readonly_fields = ('notification_link', 'transaction_link', )
@@ -67,6 +72,7 @@ class RefundAdmin(admin.ModelAdmin):
return mark_safe('<a href="%s">%s</a>' % (url, obj.transaction.pspReference))
transaction_link.short_description = 'Transaction'
+
class AdyenLogAdmin(admin.ModelAdmin):
list_display = ('timestamp', 'success', 'sentstr', 'pspReference', 'message', )
@@ -78,6 +84,7 @@ class AdyenLogAdmin(admin.ModelAdmin):
return obj.sent and 'Yes' or 'No'
sentstr.short_description = 'Log sent'
+
admin.site.register(RawNotification, RawNotificationAdmin)
admin.site.register(Notification, NotificationAdmin)
admin.site.register(Report, ReportAdmin)