diff --git a/src/pretix/plugins/stripe/payment.py b/src/pretix/plugins/stripe/payment.py index 98a246b60..c648d64e5 100644 --- a/src/pretix/plugins/stripe/payment.py +++ b/src/pretix/plugins/stripe/payment.py @@ -221,6 +221,20 @@ class StripeSettingsHolder(BasePaymentProvider): ] extra_fields = [ + ('walletdetection', + forms.BooleanField( + label=mark_safe( + _('Check for Apple Pay/Google Pay') + + ' ' + + '{}'.format(_('experimental')) + ), + help_text=_("pretix will attempt to check if the customer's webbrowser supports wallet-based payment " + "methods like Apple Pay or Google Pay and display them prominently with the credit card" + "payment method. This detection does not take into consideration if Google Pay/Apple Pay " + "has been disabled in the Stripe Dashboard."), + initial=True, + required=False, + )), ('postfix', forms.CharField( label=_('Statement descriptor postfix'), @@ -754,7 +768,9 @@ class StripeCC(StripeMethod): # ToDo: Check against Stripe API, if ApplePay and GooglePay are even activated/available # This is probably only really feasable once the Payment Methods Configuration API is out of beta # https://stripe.com/docs/connect/payment-method-configurations - return [WalletQueries.APPLEPAY, WalletQueries.GOOGLEPAY] + if self.settings.get("walletdetection", True, as_type=bool): + return [WalletQueries.APPLEPAY, WalletQueries.GOOGLEPAY] + return [] def payment_form_render(self, request, total) -> str: account = get_stripe_account_key(self)