First steps into a payment provider API

This commit is contained in:
Raphael Michel
2015-03-04 13:58:25 +01:00
parent bef74c39f7
commit 386bd032cf
9 changed files with 65 additions and 0 deletions

View 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()

View File

@@ -8,6 +8,7 @@ from django.apps import apps
class PluginType(Enum):
RESTRICTION = 1
PAYMENT = 2
def get_all_plugins() -> "List[class]":

View File

@@ -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=[]
)