mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Add a dummy Stripe plugin for testing purposes
This commit is contained in:
22
src/pretix/plugins/stripe/__init__.py
Normal file
22
src/pretix/plugins/stripe/__init__.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from pretix.base.plugins import PluginType
|
||||
|
||||
|
||||
class StripeApp(AppConfig):
|
||||
name = 'pretix.plugins.stripe'
|
||||
verbose_name = _("Stripe")
|
||||
|
||||
class PretixPluginMeta:
|
||||
type = PluginType.PAYMENT
|
||||
name = _("Stripe")
|
||||
author = _("the pretix team")
|
||||
version = '1.0.0'
|
||||
description = _("This plugin allows you to receive credit card payments " +
|
||||
"via Stripe")
|
||||
|
||||
def ready(self):
|
||||
from . import signals # NOQA
|
||||
|
||||
|
||||
default_app_config = 'pretix.plugins.stripe.StripeApp'
|
||||
12
src/pretix/plugins/stripe/payment.py
Normal file
12
src/pretix/plugins/stripe/payment.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from collections import OrderedDict
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django import forms
|
||||
|
||||
from pretix.base.payment import BasePaymentProvider
|
||||
|
||||
|
||||
class Stripe(BasePaymentProvider):
|
||||
identifier = 'stripe'
|
||||
verbose_name = _('Credit Card via Stripe')
|
||||
settings_form_fields = OrderedDict([
|
||||
])
|
||||
10
src/pretix/plugins/stripe/signals.py
Normal file
10
src/pretix/plugins/stripe/signals.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from django.dispatch import receiver
|
||||
|
||||
from pretix.base.signals import register_payment_providers
|
||||
|
||||
from .payment import Stripe
|
||||
|
||||
|
||||
@receiver(register_payment_providers)
|
||||
def register_payment_provider(sender, **kwargs):
|
||||
return Stripe
|
||||
Reference in New Issue
Block a user