forked from CGM_Public/pretix_original
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1933c18b91 |
@@ -38,7 +38,7 @@ class Paypal2App(AppConfig):
|
|||||||
featured = True
|
featured = True
|
||||||
picture = 'pretixplugins/paypal2/paypal_logo.svg'
|
picture = 'pretixplugins/paypal2/paypal_logo.svg'
|
||||||
description = _("Accept payments with your PayPal account. In addition to regular PayPal payments, you can now "
|
description = _("Accept payments with your PayPal account. In addition to regular PayPal payments, you can now "
|
||||||
"also offer payments in a variety of local payment methods such as giropay, SOFORT, iDEAL and "
|
"also offer payments in a variety of local payment methods such as eps, iDEAL, and "
|
||||||
"many more to your customers - they don't even need a PayPal account. PayPal is one of the "
|
"many more to your customers - they don't even need a PayPal account. PayPal is one of the "
|
||||||
"most popular payment methods world-wide.")
|
"most popular payment methods world-wide.")
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ class PaypalSettingsHolder(BasePaymentProvider):
|
|||||||
label=_('Alternative Payment Methods'),
|
label=_('Alternative Payment Methods'),
|
||||||
help_text=_(
|
help_text=_(
|
||||||
'In addition to payments through a PayPal account, you can also offer your customers the option '
|
'In addition to payments through a PayPal account, you can also offer your customers the option '
|
||||||
'to pay with credit cards and other, local payment methods such as SOFORT, giropay, iDEAL, and '
|
'to pay with credit cards and other, local payment methods such as eps, iDEAL, and '
|
||||||
'many more - even when they do not have a PayPal account. Eligible payment methods will be '
|
'many more - even when they do not have a PayPal account. Eligible payment methods will be '
|
||||||
'determined based on the shoppers location. For German merchants, this is the direct successor '
|
'determined based on the shoppers location. For German merchants, this is the direct successor '
|
||||||
'of PayPal Plus.'
|
'of PayPal Plus.'
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class StripeApp(AppConfig):
|
|||||||
featured = True
|
featured = True
|
||||||
picture = 'pretixplugins/stripe/stripe_logo.svg'
|
picture = 'pretixplugins/stripe/stripe_logo.svg'
|
||||||
description = _("Accept payments via Stripe, a globally popular payment service provider. Stripe supports "
|
description = _("Accept payments via Stripe, a globally popular payment service provider. Stripe supports "
|
||||||
"payments via credit cards as well as many local payment methods such as giropay, iDEAL, Alipay,"
|
"payments via credit cards as well as many local payment methods such as iDEAL, Alipay,"
|
||||||
"and many more.")
|
"and many more.")
|
||||||
|
|
||||||
def ready(self):
|
def ready(self):
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ import json
|
|||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
import zoneinfo
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
from datetime import datetime
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from json import JSONDecodeError
|
from json import JSONDecodeError
|
||||||
|
|
||||||
@@ -108,7 +110,7 @@ logger = logging.getLogger('pretix.plugins.stripe')
|
|||||||
# - Bancontact: ✓
|
# - Bancontact: ✓
|
||||||
# - BLIK: ✗
|
# - BLIK: ✗
|
||||||
# - EPS: ✓
|
# - EPS: ✓
|
||||||
# - giropay: ✓
|
# - giropay: (deprecated)
|
||||||
# - iDEAL: ✓
|
# - iDEAL: ✓
|
||||||
# - P24: ✓
|
# - P24: ✓
|
||||||
# - Sofort: ✓
|
# - Sofort: ✓
|
||||||
@@ -335,14 +337,6 @@ class StripeSettingsHolder(BasePaymentProvider):
|
|||||||
label=_('Credit card payments'),
|
label=_('Credit card payments'),
|
||||||
required=False,
|
required=False,
|
||||||
)),
|
)),
|
||||||
('method_giropay',
|
|
||||||
forms.BooleanField(
|
|
||||||
label=_('giropay'),
|
|
||||||
disabled=self.event.currency != 'EUR',
|
|
||||||
help_text=_('Some payment methods might need to be enabled in the settings of your Stripe account '
|
|
||||||
'before they work properly.'),
|
|
||||||
required=False,
|
|
||||||
)),
|
|
||||||
('method_ideal',
|
('method_ideal',
|
||||||
forms.BooleanField(
|
forms.BooleanField(
|
||||||
label=_('iDEAL'),
|
label=_('iDEAL'),
|
||||||
@@ -1487,6 +1481,17 @@ class StripeGiropay(StripeRedirectWithAccountNamePaymentIntentMethod):
|
|||||||
)
|
)
|
||||||
redirect_in_widget_allowed = False
|
redirect_in_widget_allowed = False
|
||||||
|
|
||||||
|
def is_allowed(self, request: HttpRequest, total: Decimal=None) -> bool:
|
||||||
|
# Stripe<>giropay is shut down July 1st
|
||||||
|
return super().is_allowed(request, total) and now() < datetime(
|
||||||
|
2024, 7, 1, 0, 0, 0, tzinfo=zoneinfo.ZoneInfo("Europe/Berlin")
|
||||||
|
)
|
||||||
|
|
||||||
|
def order_change_allowed(self, order: Order, request: HttpRequest=None) -> bool:
|
||||||
|
return super().order_change_allowed(order, request) and now() < datetime(
|
||||||
|
2024, 7, 1, 0, 0, 0, tzinfo=zoneinfo.ZoneInfo("Europe/Berlin")
|
||||||
|
)
|
||||||
|
|
||||||
def _payment_intent_kwargs(self, request, payment):
|
def _payment_intent_kwargs(self, request, payment):
|
||||||
return {
|
return {
|
||||||
"payment_method_data": {
|
"payment_method_data": {
|
||||||
@@ -1560,7 +1565,6 @@ class StripeBancontact(StripeRedirectWithAccountNamePaymentIntentMethod):
|
|||||||
return {
|
return {
|
||||||
"payment_method_data": {
|
"payment_method_data": {
|
||||||
"type": "bancontact",
|
"type": "bancontact",
|
||||||
"giropay": {},
|
|
||||||
"billing_details": {
|
"billing_details": {
|
||||||
"name": request.session.get(f"payment_stripe_{self.method}_account") or gettext("unknown name")
|
"name": request.session.get(f"payment_stripe_{self.method}_account") or gettext("unknown name")
|
||||||
},
|
},
|
||||||
@@ -1663,7 +1667,6 @@ class StripeEPS(StripeRedirectWithAccountNamePaymentIntentMethod):
|
|||||||
return {
|
return {
|
||||||
"payment_method_data": {
|
"payment_method_data": {
|
||||||
"type": "eps",
|
"type": "eps",
|
||||||
"giropay": {},
|
|
||||||
"billing_details": {
|
"billing_details": {
|
||||||
"name": request.session.get(f"payment_stripe_{self.method}_account") or gettext("unknown name")
|
"name": request.session.get(f"payment_stripe_{self.method}_account") or gettext("unknown name")
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user