Compare commits

...

1 Commits

Author SHA1 Message Date
Raphael Michel
1933c18b91 Phase out giropay support 2024-06-26 10:09:13 +02:00
4 changed files with 17 additions and 14 deletions

View File

@@ -38,7 +38,7 @@ class Paypal2App(AppConfig):
featured = True
picture = 'pretixplugins/paypal2/paypal_logo.svg'
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 "
"most popular payment methods world-wide.")

View File

@@ -149,7 +149,7 @@ class PaypalSettingsHolder(BasePaymentProvider):
label=_('Alternative Payment Methods'),
help_text=_(
'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 '
'determined based on the shoppers location. For German merchants, this is the direct successor '
'of PayPal Plus.'

View File

@@ -38,7 +38,7 @@ class StripeApp(AppConfig):
featured = True
picture = 'pretixplugins/stripe/stripe_logo.svg'
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.")
def ready(self):

View File

@@ -36,7 +36,9 @@ import json
import logging
import re
import urllib.parse
import zoneinfo
from collections import OrderedDict
from datetime import datetime
from decimal import Decimal
from json import JSONDecodeError
@@ -108,7 +110,7 @@ logger = logging.getLogger('pretix.plugins.stripe')
# - Bancontact: ✓
# - BLIK: ✗
# - EPS: ✓
# - giropay:
# - giropay: (deprecated)
# - iDEAL: ✓
# - P24: ✓
# - Sofort: ✓
@@ -335,14 +337,6 @@ class StripeSettingsHolder(BasePaymentProvider):
label=_('Credit card payments'),
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',
forms.BooleanField(
label=_('iDEAL'),
@@ -1487,6 +1481,17 @@ class StripeGiropay(StripeRedirectWithAccountNamePaymentIntentMethod):
)
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):
return {
"payment_method_data": {
@@ -1560,7 +1565,6 @@ class StripeBancontact(StripeRedirectWithAccountNamePaymentIntentMethod):
return {
"payment_method_data": {
"type": "bancontact",
"giropay": {},
"billing_details": {
"name": request.session.get(f"payment_stripe_{self.method}_account") or gettext("unknown name")
},
@@ -1663,7 +1667,6 @@ class StripeEPS(StripeRedirectWithAccountNamePaymentIntentMethod):
return {
"payment_method_data": {
"type": "eps",
"giropay": {},
"billing_details": {
"name": request.session.get(f"payment_stripe_{self.method}_account") or gettext("unknown name")
},