mirror of
https://github.com/pretix/pretix.git
synced 2026-09-14 16:24:43 +00:00
Payment providers: Add priority flag
This commit is contained in:
@@ -83,6 +83,14 @@ class BasePaymentProvider:
|
||||
"""
|
||||
return False
|
||||
|
||||
@property
|
||||
def priority(self) -> int:
|
||||
"""
|
||||
Returns a priority that is used for sorting payment providers. Higher priority means higher up in the list.
|
||||
Default to 100. Providers with same priority are sorted alphabetically.
|
||||
"""
|
||||
return 100
|
||||
|
||||
@property
|
||||
def is_enabled(self) -> bool:
|
||||
"""
|
||||
@@ -925,6 +933,7 @@ class OffsettingProvider(BasePaymentProvider):
|
||||
class GiftCardPayment(BasePaymentProvider):
|
||||
identifier = "giftcard"
|
||||
verbose_name = _("Gift card")
|
||||
priority = 10
|
||||
|
||||
@property
|
||||
def settings_form_fields(self):
|
||||
|
||||
Reference in New Issue
Block a user