forked from CGM_Public/pretix_original
First steps into a payment provider API
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from pretix.base.plugins import PluginType
|
||||
|
||||
|
||||
class BankTransferApp(AppConfig):
|
||||
name = 'pretix.plugins.banktransfer'
|
||||
verbose_name = _("Bank transfer")
|
||||
|
||||
class PretixPluginMeta:
|
||||
type = PluginType.PAYMENT
|
||||
name = _("Bank transfer")
|
||||
author = _("the pretix team")
|
||||
version = '1.0.0'
|
||||
description = _("This plugin allows you to receive payments " +
|
||||
"via bank transfer ")
|
||||
|
||||
def ready(self):
|
||||
from . import signals # NOQA
|
||||
|
||||
|
||||
default_app_config = 'pretix.plugins.banktransfer.BankTransferApp'
|
||||
@@ -0,0 +1,5 @@
|
||||
from pretix.base.payment import BasePaymentProvider
|
||||
|
||||
|
||||
class BankTransfer(BasePaymentProvider):
|
||||
pass
|
||||
@@ -0,0 +1,10 @@
|
||||
from django.dispatch import receiver
|
||||
|
||||
from pretix.base.signals import register_payment_providers
|
||||
|
||||
from .payment import BankTransfer
|
||||
|
||||
|
||||
@receiver(register_payment_providers)
|
||||
def register_payment_provider(sender, **kwargs):
|
||||
return BankTransfer
|
||||
Reference in New Issue
Block a user