Order details: Display payment information

This commit is contained in:
Raphael Michel
2015-03-20 23:20:12 +01:00
parent 4a72d11c67
commit 5664177bbb
11 changed files with 172 additions and 5 deletions

View File

@@ -1488,8 +1488,8 @@ class Order(Versionable):
STATUS_CANCELLED = "c"
STATUS_REFUNDED = "r"
STATUS_CHOICE = (
(STATUS_PAID, _("pending")),
(STATUS_PENDING, _("paid")),
(STATUS_PENDING, _("pending")),
(STATUS_PAID, _("paid")),
(STATUS_EXPIRED, _("expired")),
(STATUS_CANCELLED, _("cancelled")),
(STATUS_REFUNDED, _("refunded"))

View File

@@ -273,3 +273,17 @@ class BasePaymentProvider:
:param order: The order object
"""
return None
def order_control_render(self, request: HttpRequest, order: Order) -> str:
"""
Will be called if the *event administrator* views the detail page of an order
which is associated with this payment provider.
It should return HTML code containing information regarding the current payment
status and, if applicable, next steps.
The default implementation returns the verbose name of the payment provider.
:param order: The order object
"""
return _('Payment provider: %s' % self.verbose_name)