cfgmr / indico_sixpay Goto Github PK
View Code? Open in Web Editor NEWThis project forked from maxfischer2781/indico_sixpay
Indico EPayment Sub-Plugin to use SixPay services
License: GNU General Public License v3.0
This project forked from maxfischer2781/indico_sixpay
Indico EPayment Sub-Plugin to use SixPay services
License: GNU General Public License v3.0
FormatField validator in plugin.py uses the format_map(data_map) method to replace placeholders in the plugin configuration, which is not available in py2. Full stack trace:
2018-02-07 10:18:57,968 dc0ff1b4392340ee indico.flask - ERROR errors.py:107 -- 'unicode' object has no attribute 'format_map'
Traceback (most recent call last):
File "/opt/indico/.venv/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/indico/.venv/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/flask/util.py", line 114, in wrapper
return obj().process()
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/rh.py", line 270, in process
res = self._do_process()
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/rh.py", line 249, in _do_process
return self._process()
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/core/plugins/controllers.py", line 73, in _process
if form.validate_on_submit():
File "/opt/indico/.venv/lib/python2.7/site-packages/flask_wtf/form.py", line 101, in validate_on_submit
return self.is_submitted() and self.validate()
File "/opt/indico/.venv/lib/python2.7/site-packages/indico/web/forms/base.py", line 150, in validate
valid = super(IndicoForm, self).validate()
File "/opt/indico/.venv/lib/python2.7/site-packages/wtforms/form.py", line 310, in validate
return super(Form, self).validate(extra)
File "/opt/indico/.venv/lib/python2.7/site-packages/wtforms/form.py", line 152, in validate
if not field.validate(self, extra):
File "/opt/indico/.venv/lib/python2.7/site-packages/wtforms/fields/core.py", line 204, in validate
stop_validation = self._run_validation_chain(form, chain)
File "/opt/indico/.venv/lib/python2.7/site-packages/wtforms/fields/core.py", line 224, in _run_validation_chain
validator(form, self)
File "/opt/indico/indico_sixpay/indico_sixpay/plugin.py", line 89, in __call__
test_format = field.data.format_map(self.field_map)
AttributeError: 'unicode' object has no attribute 'format_map'
{u'data': {u'get': {},
u'headers': {'Accept': u'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding': u'gzip, deflate, br',
'Accept-Language': u'en-US,en;q=0.5',
'Connection': u'keep-alive',
'Content-Length': u'270',
'Content-Type': u'application/x-www-form-urlencoded; charset=UTF-8',
'Cookie': u'SCREEN_NAME=6968586b48374362562f4348445663546f564b4151773d3d; indico_session=2fa468d9-24e7-46f5-a4a2-70b00892e3c1',
'Host': u'dm-carsten.geomar.de',
'Referer': u'https://dm-carsten.geomar.de/admin/payment/',
'User-Agent': u'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:58.0) Gecko/20100101 Firefox/58.0',
'X-Csrf-Token': u'efff732a-1df5-4a10-b32f-d47029edb258',
'X-Requested-With': u'XMLHttpRequest'},
u'json': None,
u'post': {'account_id': u'401860-17795278',
'csrf_token': u'efff732a-1df5-4a10-b32f-d47029edb258',
'method_name': u'SixPay',
'notification_mail': u'[email protected]',
'order_description': u'%(event_title)s, %(user_name)s',
'order_identifier': u'%(eventuser_id)s',
'url': u'https://test.saferpay.com/hosting/'},
u'url': {'plugin': u'payment_sixpay'}},
u'endpoint': u'payment.admin_plugin_settings',
u'id': 'dc0ff1b4392340ee',
u'ip': '134.245.216.72',
u'method': 'POST',
u'referrer': 'https://dm-carsten.geomar.de/admin/payment/',
u'rh': 'RHPaymentAdminPluginSettings',
u'time': '2018-02-07T10:19:03.062172',
u'url': u'https://dm-carsten.geomar.de/admin/payment/payment_sixpay/',
u'user': {u'email': u'[email protected]', u'id': 3, u'name': u'Claas Faber'},
u'user_agent': u'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:58.0) Gecko/20100101 Firefox/58.0'}
"Reference number" in Saferpay is not unique - must be changed in plugin
In order to allow for translated strings particularly in German/English combination to be compliant with payment / order regulations add translation capability for "Pay now" button.
Change to {% trans -%} Pay now {%- endtrans -%} syntax and add in translation mappings?
Put registrant's name before conference name since this field is cut off and may destroy registrant's name
Example: Saferpay eCommerce: INTERNATIONAL CONFERENCE KIEL 2018, Carsten Schirn
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.