-
Notifications
You must be signed in to change notification settings - Fork 1
/
__init__.py
41 lines (31 loc) · 1.12 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy
try:
from pretix.base.plugins import PluginConfig
except ImportError:
raise RuntimeError("Please use pretix 2.7 or above to run this plugin!")
__version__ = '1.0.0'
class PluginMercadoPago(PluginConfig):
name = 'pretix_mercadopago'
verbose_name = 'MercadoPago Pretix plugin'
class PretixPluginMeta:
name = gettext_lazy('MercadoPago Pretix plugin')
author = 'FOSS4G team'
description = gettext_lazy('Payment Provider for MercadoPago.')
visible = True
version = __version__
category = 'PAYMENT'
compatibility = "pretix>=2.7.0"
def ready(self):
from . import signals # NOQA
def installed(self, event):
pass # Your code here
@cached_property
def compatibility_errors(self):
errs = []
try:
import mercadopago # NOQA
except ImportError:
errs.append("Python package 'mercadopago' SDK is not installed.")
return errs
default_app_config = 'pretix_mercadopago.PluginMercadoPago'