forked from CGM_Public/pretix_original
Display payment details
This commit is contained in:
@@ -714,7 +714,7 @@ class Item(Versionable):
|
||||
if self.event:
|
||||
self.event.get_cache().clear()
|
||||
|
||||
def delete(self):
|
||||
def delete(self, *args, **kwargs):
|
||||
self.deleted = True
|
||||
self.active = False
|
||||
super().save()
|
||||
@@ -1229,11 +1229,13 @@ class Order(Versionable):
|
||||
STATUS_PAID = "p"
|
||||
STATUS_EXPIRED = "e"
|
||||
STATUS_CANCELLED = "c"
|
||||
STATUS_REFUNDED = "r"
|
||||
STATUS_CHOICE = (
|
||||
(STATUS_PAID, _("pending")),
|
||||
(STATUS_PENDING, _("paid")),
|
||||
(STATUS_EXPIRED, _("expired")),
|
||||
(STATUS_CANCELLED, _("cancelled")),
|
||||
(STATUS_REFUNDED, _("refunded"))
|
||||
)
|
||||
|
||||
code = models.CharField(
|
||||
|
||||
@@ -150,3 +150,28 @@ class BasePaymentProvider:
|
||||
:param order: The order object
|
||||
"""
|
||||
return None
|
||||
|
||||
def order_pending_render(self, request, order) -> str:
|
||||
"""
|
||||
Will be called if the user views the detail page of an unpaid order which is
|
||||
associated with this payment provider.
|
||||
|
||||
It should return HTML code which should be displayed to the user. It should contian
|
||||
instructions on how to continue with the payment process, either in form of text
|
||||
or buttons/links/etc.
|
||||
|
||||
:param order: The order object
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def order_paid_render(self, request, order) -> str:
|
||||
"""
|
||||
Will be called if the user views the detail page of an paid order which is
|
||||
associated with this payment provider.
|
||||
|
||||
It should return HTML code which should be displayed to the user or None,
|
||||
if there is nothing to say.
|
||||
|
||||
:param order: The order object
|
||||
"""
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user