Stripe: Add PayPal (#4049) (Z#23123667)

This commit is contained in:
Martin Gross
2024-04-09 10:06:58 +02:00
committed by GitHub
parent 0067c3537d
commit 58add74b3a
2 changed files with 19 additions and 4 deletions

View File

@@ -149,7 +149,7 @@ logger = logging.getLogger('pretix.plugins.stripe')
# - Secure Remote Commerce: ✗
# - Link: ✓ (PaymentRequestButton)
# - Cash App Pay: ✗
# - PayPal:
# - PayPal: ✓ (No settings UI yet)
# - MobilePay: ✗
# - Alipay: ✓
# - WeChat Pay: ✓
@@ -468,6 +468,14 @@ class StripeSettingsHolder(BasePaymentProvider):
]),
required=False,
)),
# Disabled for now, since we still need to figure out how to make this work on our connect platform
# ('method_paypal',
# forms.BooleanField(
# label=_('PayPal'),
# disabled=self.event.currency not in [
# 'EUR', 'GBP', 'USD', 'CHF', 'CZK', 'DKK', 'NOK', 'PLN', 'SEK', 'AUD', 'CAD', 'HKD', 'NZD', 'SGD'
# ]
# )),
] + extra_fields + list(super().settings_form_fields.items()) + moto_settings
)
if not self.settings.connect_client_id or self.settings.secret_key:
@@ -1892,3 +1900,10 @@ class StripeWeChatPay(StripeRedirectMethod):
},
}
}
class StripePayPal(StripeRedirectMethod):
identifier = 'stripe_paypal'
verbose_name = _('PayPal via Stripe')
public_name = _('PayPal')
method = 'paypal'

View File

@@ -47,14 +47,14 @@ def register_payment_provider(sender, **kwargs):
from .payment import (
StripeAffirm, StripeAlipay, StripeBancontact, StripeCC, StripeEPS,
StripeGiropay, StripeIdeal, StripeKlarna, StripeMultibanco,
StripePrzelewy24, StripeSEPADirectDebit, StripeSettingsHolder,
StripeSofort, StripeWeChatPay,
StripePayPal, StripePrzelewy24, StripeSEPADirectDebit,
StripeSettingsHolder, StripeSofort, StripeWeChatPay,
)
return [
StripeSettingsHolder, StripeCC, StripeGiropay, StripeIdeal, StripeAlipay, StripeBancontact,
StripeSofort, StripeEPS, StripeMultibanco, StripePrzelewy24, StripeWeChatPay,
StripeSEPADirectDebit, StripeAffirm, StripeKlarna,
StripeSEPADirectDebit, StripeAffirm, StripeKlarna, StripePayPal,
]