forked from CGM_Public/pretix_original
Stripe/PayPal: Add explanatory texts (Z#23127572) (#3826)
This commit is contained in:
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% if method == "wallet" %}
|
{% if method == "wallet" %}
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
A PayPal account is required to use this online payment method. Please keep your account information
|
||||||
|
ready to enter in the next step.
|
||||||
|
{% endblocktrans %}
|
||||||
{% blocktrans trimmed %}
|
{% blocktrans trimmed %}
|
||||||
Please click the "Pay with PayPal" button below to start your payment.
|
Please click the "Pay with PayPal" button below to start your payment.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
|
|||||||
@@ -484,6 +484,7 @@ class StripeMethod(BasePaymentProvider):
|
|||||||
method = ''
|
method = ''
|
||||||
redirect_action_handling = 'iframe' # or redirect
|
redirect_action_handling = 'iframe' # or redirect
|
||||||
confirmation_method = 'manual'
|
confirmation_method = 'manual'
|
||||||
|
explanation = ''
|
||||||
|
|
||||||
def __init__(self, event: Event):
|
def __init__(self, event: Event):
|
||||||
super().__init__(event)
|
super().__init__(event)
|
||||||
@@ -1174,6 +1175,7 @@ class StripeRedirectMethod(StripeMethod):
|
|||||||
'request': request,
|
'request': request,
|
||||||
'event': self.event,
|
'event': self.event,
|
||||||
'settings': self.settings,
|
'settings': self.settings,
|
||||||
|
'explanation': self.explanation,
|
||||||
}
|
}
|
||||||
return template.render(ctx)
|
return template.render(ctx)
|
||||||
|
|
||||||
@@ -1204,6 +1206,7 @@ class StripeCC(StripeMethod):
|
|||||||
'event': self.event,
|
'event': self.event,
|
||||||
'total': self._decimal_to_int(total),
|
'total': self._decimal_to_int(total),
|
||||||
'settings': self.settings,
|
'settings': self.settings,
|
||||||
|
'explanation': self.explanation,
|
||||||
'is_moto': self.is_moto(request)
|
'is_moto': self.is_moto(request)
|
||||||
}
|
}
|
||||||
return template.render(ctx)
|
return template.render(ctx)
|
||||||
@@ -1297,6 +1300,7 @@ class StripeSEPADirectDebit(StripeMethod):
|
|||||||
'event': self.event,
|
'event': self.event,
|
||||||
'settings': self.settings,
|
'settings': self.settings,
|
||||||
'form': self.payment_form(request),
|
'form': self.payment_form(request),
|
||||||
|
'explanation': self.explanation,
|
||||||
'email': order.email if order else cs.get('email', '')
|
'email': order.email if order else cs.get('email', '')
|
||||||
}
|
}
|
||||||
return template.render(ctx)
|
return template.render(ctx)
|
||||||
@@ -1429,6 +1433,7 @@ class StripeAffirm(StripeMethod):
|
|||||||
'request': request,
|
'request': request,
|
||||||
'event': self.event,
|
'event': self.event,
|
||||||
'total': self._decimal_to_int(total),
|
'total': self._decimal_to_int(total),
|
||||||
|
'explanation': self.explanation,
|
||||||
'method': self.method,
|
'method': self.method,
|
||||||
}
|
}
|
||||||
return template.render(ctx)
|
return template.render(ctx)
|
||||||
@@ -1491,6 +1496,7 @@ class StripeKlarna(StripeRedirectMethod):
|
|||||||
"event": self.event,
|
"event": self.event,
|
||||||
"total": self._decimal_to_int(total),
|
"total": self._decimal_to_int(total),
|
||||||
"method": self.method,
|
"method": self.method,
|
||||||
|
'explanation': self.explanation,
|
||||||
"country": self._detect_country(request, order)
|
"country": self._detect_country(request, order)
|
||||||
}
|
}
|
||||||
return template.render(ctx)
|
return template.render(ctx)
|
||||||
@@ -1522,6 +1528,7 @@ class StripeRedirectWithAccountNamePaymentIntentMethod(StripeRedirectMethod):
|
|||||||
'request': request,
|
'request': request,
|
||||||
'event': self.event,
|
'event': self.event,
|
||||||
'settings': self.settings,
|
'settings': self.settings,
|
||||||
|
'explanation': self.explanation,
|
||||||
'form': self.payment_form(request)
|
'form': self.payment_form(request)
|
||||||
}
|
}
|
||||||
return template.render(ctx)
|
return template.render(ctx)
|
||||||
@@ -1553,6 +1560,10 @@ class StripeGiropay(StripeRedirectWithAccountNamePaymentIntentMethod):
|
|||||||
verbose_name = _('giropay via Stripe')
|
verbose_name = _('giropay via Stripe')
|
||||||
public_name = _('giropay')
|
public_name = _('giropay')
|
||||||
method = 'giropay'
|
method = 'giropay'
|
||||||
|
explanation = _(
|
||||||
|
'giropay is an online payment method available to all customers of most German banks, usually after one-time '
|
||||||
|
'activation. Please keep your online banking account and login information available.'
|
||||||
|
)
|
||||||
|
|
||||||
def _payment_intent_kwargs(self, request, payment):
|
def _payment_intent_kwargs(self, request, payment):
|
||||||
return {
|
return {
|
||||||
@@ -1584,6 +1595,10 @@ class StripeIdeal(StripeRedirectMethod):
|
|||||||
verbose_name = _('iDEAL via Stripe')
|
verbose_name = _('iDEAL via Stripe')
|
||||||
public_name = _('iDEAL')
|
public_name = _('iDEAL')
|
||||||
method = 'ideal'
|
method = 'ideal'
|
||||||
|
explanation = _(
|
||||||
|
'iDEAL is an online payment method available to customers of Dutch banks. Please keep your online '
|
||||||
|
'banking account and login information available.'
|
||||||
|
)
|
||||||
|
|
||||||
def payment_presale_render(self, payment: OrderPayment) -> str:
|
def payment_presale_render(self, payment: OrderPayment) -> str:
|
||||||
pi = payment.info_data or {}
|
pi = payment.info_data or {}
|
||||||
@@ -1605,6 +1620,10 @@ class StripeAlipay(StripeRedirectMethod):
|
|||||||
public_name = _('Alipay')
|
public_name = _('Alipay')
|
||||||
method = 'alipay'
|
method = 'alipay'
|
||||||
confirmation_method = 'automatic'
|
confirmation_method = 'automatic'
|
||||||
|
explanation = _(
|
||||||
|
'This payment method is available to customers of the Chinese payment system Alipay. Please keep '
|
||||||
|
'your login information available.'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class StripeBancontact(StripeRedirectWithAccountNamePaymentIntentMethod):
|
class StripeBancontact(StripeRedirectWithAccountNamePaymentIntentMethod):
|
||||||
@@ -1650,6 +1669,7 @@ class StripeSofort(StripeMethod):
|
|||||||
'request': request,
|
'request': request,
|
||||||
'event': self.event,
|
'event': self.event,
|
||||||
'settings': self.settings,
|
'settings': self.settings,
|
||||||
|
'explanation': self.explanation,
|
||||||
'form': self.payment_form(request)
|
'form': self.payment_form(request)
|
||||||
}
|
}
|
||||||
return template.render(ctx)
|
return template.render(ctx)
|
||||||
@@ -1750,6 +1770,7 @@ class StripeMultibanco(StripeSourceMethod):
|
|||||||
'request': request,
|
'request': request,
|
||||||
'event': self.event,
|
'event': self.event,
|
||||||
'settings': self.settings,
|
'settings': self.settings,
|
||||||
|
'explanation': self.explanation,
|
||||||
'form': self.payment_form(request)
|
'form': self.payment_form(request)
|
||||||
}
|
}
|
||||||
return template.render(ctx)
|
return template.render(ctx)
|
||||||
@@ -1790,6 +1811,10 @@ class StripePrzelewy24(StripeRedirectMethod):
|
|||||||
verbose_name = _('Przelewy24 via Stripe')
|
verbose_name = _('Przelewy24 via Stripe')
|
||||||
public_name = _('Przelewy24')
|
public_name = _('Przelewy24')
|
||||||
method = 'p24'
|
method = 'p24'
|
||||||
|
explanation = _(
|
||||||
|
'Przelewy24 is an online payment method available to customers of Polish banks. Please keep your online '
|
||||||
|
'banking account and login information available.'
|
||||||
|
)
|
||||||
|
|
||||||
def _payment_intent_kwargs(self, request, payment):
|
def _payment_intent_kwargs(self, request, payment):
|
||||||
return {
|
return {
|
||||||
@@ -1825,6 +1850,10 @@ class StripeWeChatPay(StripeRedirectMethod):
|
|||||||
public_name = _('WeChat Pay')
|
public_name = _('WeChat Pay')
|
||||||
method = 'wechat_pay'
|
method = 'wechat_pay'
|
||||||
confirmation_method = 'automatic'
|
confirmation_method = 'automatic'
|
||||||
|
explanation = _(
|
||||||
|
'This payment method is available to users of the Chinese app WeChat. Please keep your login information '
|
||||||
|
'available.'
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_enabled(self) -> bool:
|
def is_enabled(self) -> bool:
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% if explanation %}
|
||||||
|
<p>{{ explanation }}</p>
|
||||||
|
{% endif %}
|
||||||
<div class="form-horizontal stripe-container">
|
<div class="form-horizontal stripe-container">
|
||||||
{% if is_moto %}
|
{% if is_moto %}
|
||||||
<h1>
|
<h1>
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
|
||||||
|
{% if explanation %}
|
||||||
|
<p>{{ explanation }}</p>
|
||||||
|
{% endif %}
|
||||||
<div class="form-horizontal stripe-container">
|
<div class="form-horizontal stripe-container">
|
||||||
<div class="stripe-errors sr-only">
|
<div class="stripe-errors sr-only">
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% if explanation %}
|
||||||
|
<p>{{ explanation }}</p>
|
||||||
|
{% endif %}
|
||||||
{% bootstrap_form form layout='horizontal' %}
|
{% bootstrap_form form layout='horizontal' %}
|
||||||
<p>{% blocktrans trimmed %}
|
<p class="help-block">{% blocktrans trimmed %}
|
||||||
After you submitted your order, we will redirect you to the payment service provider to complete your payment.
|
After you submitted your order, we will redirect you to the payment service provider to complete your payment.
|
||||||
You will then be redirected back here to get your tickets.
|
You will then be redirected back here to get your tickets.
|
||||||
{% endblocktrans %}</p>
|
{% endblocktrans %}</p>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% if explanation %}
|
||||||
|
<p>{{ explanation }}</p>
|
||||||
|
{% endif %}
|
||||||
<div class="form-horizontal stripe-container">
|
<div class="form-horizontal stripe-container">
|
||||||
<div id="stripe-{{ method }}">
|
<div id="stripe-{{ method }}">
|
||||||
<span class="fa fa-spinner fa-spin"></span>
|
<span class="fa fa-spinner fa-spin"></span>
|
||||||
@@ -10,8 +12,7 @@
|
|||||||
<p class="help-block">
|
<p class="help-block">
|
||||||
{% blocktrans trimmed %}
|
{% blocktrans trimmed %}
|
||||||
After you submitted your order, we will redirect you to the payment service provider to complete your
|
After you submitted your order, we will redirect you to the payment service provider to complete your
|
||||||
payment.
|
payment. You will then be redirected back here to get your tickets.
|
||||||
You will then be redirected back here to get your tickets.
|
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
<p>{% blocktrans trimmed %}
|
{% if explanation %}
|
||||||
|
<p>{{ explanation }}</p>
|
||||||
|
{% endif %}
|
||||||
|
<p class="help-block">{% blocktrans trimmed %}
|
||||||
After you submitted your order, we will redirect you to the payment service provider to complete your payment.
|
After you submitted your order, we will redirect you to the payment service provider to complete your payment.
|
||||||
You will then be redirected back here to get your tickets.
|
You will then be redirected back here to get your tickets.
|
||||||
{% endblocktrans %}</p>
|
{% endblocktrans %}</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user