diff --git a/src/pretix/plugins/stripe/payment.py b/src/pretix/plugins/stripe/payment.py index 5bdf998fa0..3f54e345a2 100644 --- a/src/pretix/plugins/stripe/payment.py +++ b/src/pretix/plugins/stripe/payment.py @@ -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') diff --git a/src/pretix/plugins/stripe/signals.py b/src/pretix/plugins/stripe/signals.py index 70234c4976..bf6dc08533 100644 --- a/src/pretix/plugins/stripe/signals.py +++ b/src/pretix/plugins/stripe/signals.py @@ -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, ]