mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-13 07:29:39 +00:00
Run isort
This commit is contained in:
parent
e9b4bc874d
commit
ae8f85dde7
@ -21,10 +21,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from indico.core.plugins import IndicoPluginBlueprint
|
||||
|
||||
from .request_handlers import (
|
||||
SixPayResponseHandler, UserCancelHandler,
|
||||
UserFailureHandler, UserSuccessHandler
|
||||
)
|
||||
from .request_handlers import SixPayResponseHandler, UserCancelHandler, UserFailureHandler, UserSuccessHandler
|
||||
|
||||
|
||||
#: url mount points exposing callbacks
|
||||
|
||||
@ -22,41 +22,27 @@ The entry point for indico is the :py:class:`~.SixpayPaymentPlugin`.
|
||||
It handles configuration via the settings forms, initiates payments
|
||||
and provides callbacks for finished payments via its blueprint.
|
||||
"""
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
import urlparse
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import requests
|
||||
from werkzeug.exceptions import (
|
||||
NotImplemented as HTTPNotImplemented,
|
||||
InternalServerError as HTTPInternalServerError
|
||||
)
|
||||
|
||||
import urlparse
|
||||
from werkzeug.exceptions import InternalServerError as HTTPInternalServerError
|
||||
from werkzeug.exceptions import NotImplemented as HTTPNotImplemented
|
||||
from wtforms.fields import StringField
|
||||
from wtforms.fields.html5 import URLField
|
||||
from wtforms.validators import (
|
||||
DataRequired, Optional, Regexp, Length, Email, ValidationError
|
||||
)
|
||||
from indico.web.forms.fields import IndicoPasswordField
|
||||
from wtforms.validators import DataRequired, Email, Length, Optional, Regexp, ValidationError
|
||||
|
||||
from indico.core.plugins import IndicoPlugin, url_for_plugin
|
||||
from indico.modules.events.payment import (
|
||||
PaymentEventSettingsFormBase,
|
||||
PaymentPluginMixin,
|
||||
PaymentPluginSettingsFormBase)
|
||||
from indico.modules.events.payment.models.transactions import (
|
||||
PaymentTransaction,
|
||||
TransactionAction
|
||||
)
|
||||
from indico.modules.events.payment import (PaymentEventSettingsFormBase, PaymentPluginMixin,
|
||||
PaymentPluginSettingsFormBase)
|
||||
from indico.modules.events.payment.models.transactions import PaymentTransaction, TransactionAction
|
||||
from indico.web.forms.fields import IndicoPasswordField
|
||||
|
||||
|
||||
from .utility import (
|
||||
gettext, to_small_currency, get_request_header, get_terminal_id,
|
||||
provider
|
||||
)
|
||||
# blueprint mounts the request handlers onto URLs
|
||||
from .blueprint import blueprint
|
||||
from .utility import (get_request_header, get_terminal_id, gettext, provider, saferpay_json_api_spec,
|
||||
saferpay_pp_init_url, to_small_currency)
|
||||
|
||||
from .utility import saferpay_json_api_spec, saferpay_pp_init_url
|
||||
|
||||
# Dear Future Maintainer,
|
||||
#
|
||||
|
||||
@ -18,32 +18,23 @@
|
||||
# if not, see <http://www.gnu.org/licenses/>.
|
||||
"""Callbacks for asynchronous replies by Saferpay and to redirect the user."""
|
||||
from __future__ import unicode_literals
|
||||
import urlparse
|
||||
|
||||
import requests
|
||||
import urlparse
|
||||
from flask import flash, redirect, request
|
||||
from flask_pluginengine import current_plugin
|
||||
from werkzeug.exceptions import BadRequest
|
||||
|
||||
from indico.modules.events.payment.models.transactions import TransactionAction
|
||||
from indico.modules.events.payment.notifications \
|
||||
import notify_amount_inconsistency
|
||||
from indico.modules.events.registration.models.registrations \
|
||||
import Registration
|
||||
from indico.modules.events.payment.notifications import notify_amount_inconsistency
|
||||
from indico.modules.events.registration.models.registrations import Registration
|
||||
from indico.web.flask.util import url_for
|
||||
from indico.web.rh import RH
|
||||
|
||||
from .utility import (
|
||||
gettext, to_large_currency, to_small_currency, get_request_header,
|
||||
get_setting
|
||||
)
|
||||
from .utility import (
|
||||
saferpay_pp_assert_url,
|
||||
saferpay_pp_capture_url,
|
||||
saferpay_json_api_spec,
|
||||
saferpay_pp_cancel_url,
|
||||
provider
|
||||
)
|
||||
from .utility import (get_request_header, get_setting, gettext, provider, saferpay_json_api_spec,
|
||||
saferpay_pp_assert_url, saferpay_pp_cancel_url, saferpay_pp_capture_url, to_large_currency,
|
||||
to_small_currency)
|
||||
|
||||
|
||||
# RH from indico.web.rh
|
||||
# - the logic to execute when SixPay/Users are redirected *after* a transaction
|
||||
|
||||
@ -17,16 +17,17 @@
|
||||
# along with SixPay Indico EPayment Plugin;
|
||||
# if not, see <http://www.gnu.org/licenses/>.
|
||||
"""Utility functions used by the Sixpay payment plugin."""
|
||||
from __future__ import unicode_literals, division
|
||||
from __future__ import division, unicode_literals
|
||||
|
||||
import uuid
|
||||
|
||||
import iso4217
|
||||
from werkzeug.exceptions import NotImplemented as HTTPNotImplemented
|
||||
from flask_pluginengine import current_plugin
|
||||
from werkzeug.exceptions import NotImplemented as HTTPNotImplemented
|
||||
|
||||
from indico.util.i18n import make_bound_gettext
|
||||
|
||||
|
||||
#: internationalisation/localisation of strings
|
||||
gettext = make_bound_gettext('payment_sixpay')
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import os
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
|
||||
repo_base_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
# pull in the packages metadata
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user