forked from CGM_Public/pretix_original
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.'),
|
'before they work properly.'),
|
||||||
required=False,
|
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',
|
('method_swish',
|
||||||
forms.BooleanField(
|
forms.BooleanField(
|
||||||
label=_('Swish'),
|
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):
|
class StripePayPal(StripeRedirectMethod):
|
||||||
identifier = 'stripe_paypal'
|
identifier = 'stripe_paypal'
|
||||||
verbose_name = _('PayPal via Stripe')
|
verbose_name = _('PayPal via Stripe')
|
||||||
|
|||||||
@@ -47,14 +47,14 @@ def register_payment_provider(sender, **kwargs):
|
|||||||
from .payment import (
|
from .payment import (
|
||||||
StripeAffirm, StripeAlipay, StripeBancontact, StripeCC, StripeEPS,
|
StripeAffirm, StripeAlipay, StripeBancontact, StripeCC, StripeEPS,
|
||||||
StripeGiropay, StripeIdeal, StripeKlarna, StripeMultibanco,
|
StripeGiropay, StripeIdeal, StripeKlarna, StripeMultibanco,
|
||||||
StripePayPal, StripePrzelewy24, StripeSEPADirectDebit,
|
StripePayPal, StripePrzelewy24, StripeRevolutPay,
|
||||||
StripeSettingsHolder, StripeSofort, StripeSwish, StripeTwint,
|
StripeSEPADirectDebit, StripeSettingsHolder, StripeSofort, StripeSwish,
|
||||||
StripeWeChatPay,
|
StripeTwint, StripeWeChatPay,
|
||||||
)
|
)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
StripeSettingsHolder, StripeCC, StripeGiropay, StripeIdeal, StripeAlipay, StripeBancontact,
|
StripeSettingsHolder, StripeCC, StripeGiropay, StripeIdeal, StripeAlipay, StripeBancontact,
|
||||||
StripeSofort, StripeEPS, StripeMultibanco, StripePrzelewy24, StripeWeChatPay,
|
StripeSofort, StripeEPS, StripeMultibanco, StripePrzelewy24, StripeRevolutPay, StripeWeChatPay,
|
||||||
StripeSEPADirectDebit, StripeAffirm, StripeKlarna, StripePayPal, StripeSwish, StripeTwint,
|
StripeSEPADirectDebit, StripeAffirm, StripeKlarna, StripePayPal, StripeSwish, StripeTwint,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user