mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
First steps into a payment provider API
This commit is contained in:
10
src/pretix/base/payment.py
Normal file
10
src/pretix/base/payment.py
Normal file
@@ -0,0 +1,10 @@
|
||||
class BasePaymentProvider:
|
||||
"""
|
||||
This is the base class for all payment providers.
|
||||
"""
|
||||
|
||||
def get_identifier(self) -> str:
|
||||
"""
|
||||
Return a unique identifier for this payment provider
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
@@ -8,6 +8,7 @@ from django.apps import apps
|
||||
|
||||
class PluginType(Enum):
|
||||
RESTRICTION = 1
|
||||
PAYMENT = 2
|
||||
|
||||
|
||||
def get_all_plugins() -> "List[class]":
|
||||
|
||||
@@ -51,3 +51,11 @@ return a positive result (see plugin API documentation for details).
|
||||
determine_availability = EventPluginSignal(
|
||||
providing_args=["item", "variations", "context", "cache"]
|
||||
)
|
||||
|
||||
"""
|
||||
This signal is sent out to get all known payment providers. Receivers should return a
|
||||
subclass of pretix.base.payment.BasePaymentProvider
|
||||
"""
|
||||
register_payment_providers = EventPluginSignal(
|
||||
providing_args=[]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user