mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Include provider-specific text in payment notification mail
This commit is contained in:
@@ -63,7 +63,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def mark_order_paid(order: Order, provider: str=None, info: str=None, date: datetime=None, manual: bool=None,
|
||||
force: bool=False, send_mail: bool=True, user: User=None) -> Order:
|
||||
force: bool=False, send_mail: bool=True, user: User=None, mail_text='') -> Order:
|
||||
"""
|
||||
Marks an order as paid. This sets the payment provider, info and date and returns
|
||||
the order object.
|
||||
@@ -81,6 +81,8 @@ def mark_order_paid(order: Order, provider: str=None, info: str=None, date: date
|
||||
:param send_mail: Whether an email should be sent to the user about this event (default: ``True``).
|
||||
:type send_mail: boolean
|
||||
:param user: The user that performed the change
|
||||
:param mail_text: Additional text to be included in the email
|
||||
:type mail_text: str
|
||||
:raises Quota.QuotaExceededException: if the quota is exceeded and ``force`` is ``False``
|
||||
"""
|
||||
with order.event.lock() as now_dt:
|
||||
@@ -124,6 +126,7 @@ def mark_order_paid(order: Order, provider: str=None, info: str=None, date: date
|
||||
'downloads': order.event.settings.get('ticket_download', as_type=bool),
|
||||
'invoice_name': invoice_name,
|
||||
'invoice_company': invoice_company,
|
||||
'payment_info': mail_text
|
||||
},
|
||||
order.event, locale=order.locale
|
||||
)
|
||||
|
||||
@@ -231,6 +231,8 @@ Your {event} team"""))
|
||||
|
||||
we successfully received your payment for {event}. Thank you!
|
||||
|
||||
{payment_info}
|
||||
|
||||
You can change your order details and view the status of your order at
|
||||
{url}
|
||||
|
||||
|
||||
@@ -385,7 +385,7 @@ class MailSettingsForm(SettingsForm):
|
||||
label=_("Text"),
|
||||
required=False,
|
||||
widget=I18nTextarea,
|
||||
help_text=_("Available placeholders: {event}, {url}, {invoice_name}, {invoice_company}")
|
||||
help_text=_("Available placeholders: {event}, {url}, {invoice_name}, {invoice_company}, {payment_info}")
|
||||
)
|
||||
mail_text_order_free = I18nFormField(
|
||||
label=_("Text"),
|
||||
|
||||
Reference in New Issue
Block a user