mirror of
https://github.com/pretix/pretix.git
synced 2025-12-15 14:02:27 +00:00
Stripe: Add Revolut Pay (#4366)
* Stripe: Add Revolut Pay * Remove is_enabled flag
This commit is contained in:
@@ -435,6 +435,14 @@ class StripeSettingsHolder(BasePaymentProvider):
|
||||
'before they work properly.'),
|
||||
required=False,
|
||||
)),
|
||||
('method_revolut_pay',
|
||||
forms.BooleanField(
|
||||
label='Revolut Pay',
|
||||
disabled=self.event.currency not in ['EUR', 'GBP'],
|
||||
help_text=_('Some payment methods might need to be enabled in the settings of your Stripe account '
|
||||
'before they work properly.'),
|
||||
required=False,
|
||||
)),
|
||||
('method_swish',
|
||||
forms.BooleanField(
|
||||
label=_('Swish'),
|
||||
@@ -1776,6 +1784,24 @@ class StripeWeChatPay(StripeRedirectMethod):
|
||||
}
|
||||
|
||||
|
||||
class StripeRevolutPay(StripeRedirectMethod):
|
||||
verbose_name = _('Revolut Pay via Stripe')
|
||||
public_name = _('Revolut Pay')
|
||||
method = 'revolut_pay'
|
||||
confirmation_method = 'automatic'
|
||||
explanation = _(
|
||||
'This payment method is available to users of the Revolut app. Please keep your login information '
|
||||
'available.'
|
||||
)
|
||||
|
||||
def _payment_intent_kwargs(self, request, payment):
|
||||
return {
|
||||
"payment_method_data": {
|
||||
"type": "revolut_pay",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
class StripePayPal(StripeRedirectMethod):
|
||||
identifier = 'stripe_paypal'
|
||||
verbose_name = _('PayPal via Stripe')
|
||||
|
||||
@@ -47,14 +47,14 @@ def register_payment_provider(sender, **kwargs):
|
||||
from .payment import (
|
||||
StripeAffirm, StripeAlipay, StripeBancontact, StripeCC, StripeEPS,
|
||||
StripeGiropay, StripeIdeal, StripeKlarna, StripeMultibanco,
|
||||
StripePayPal, StripePrzelewy24, StripeSEPADirectDebit,
|
||||
StripeSettingsHolder, StripeSofort, StripeSwish, StripeTwint,
|
||||
StripeWeChatPay,
|
||||
StripePayPal, StripePrzelewy24, StripeRevolutPay,
|
||||
StripeSEPADirectDebit, StripeSettingsHolder, StripeSofort, StripeSwish,
|
||||
StripeTwint, StripeWeChatPay,
|
||||
)
|
||||
|
||||
return [
|
||||
StripeSettingsHolder, StripeCC, StripeGiropay, StripeIdeal, StripeAlipay, StripeBancontact,
|
||||
StripeSofort, StripeEPS, StripeMultibanco, StripePrzelewy24, StripeWeChatPay,
|
||||
StripeSofort, StripeEPS, StripeMultibanco, StripePrzelewy24, StripeRevolutPay, StripeWeChatPay,
|
||||
StripeSEPADirectDebit, StripeAffirm, StripeKlarna, StripePayPal, StripeSwish, StripeTwint,
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user