0001-Remove-dictionnary-comprehensions-to-be-compatible-w.patch
eopayment/__init__.py | ||
---|---|---|
26 | 26 |
def get_backends(): |
27 | 27 |
'''Return a dictionnary mapping existing eopayment backends name to their |
28 | 28 |
description. |
29 | 29 | |
30 | 30 |
>>> get_backends()['dummy'].description['caption'] |
31 | 31 |
'Dummy payment backend' |
32 | 32 | |
33 | 33 |
''' |
34 |
return {backend: get_backend(backend) for backend in __BACKENDS}
|
|
34 |
return dict((backend, get_backend(backend)) for backend in __BACKENDS)
|
|
35 | 35 | |
36 | 36 |
class Payment(object): |
37 | 37 |
''' |
38 | 38 |
Interface to credit card online payment servers of French banks. The |
39 | 39 |
only use case supported for now is a unique automatic payment. |
40 | 40 | |
41 | 41 |
>>> spplus_options = { \ |
42 | 42 |
'cle': '58 6d fc 9c 34 91 9b 86 3f fd 64 ' \ |
eopayment/ogone.py | ||
---|---|---|
503 | 503 |
method='POST', |
504 | 504 |
fields=[{'type': 'hidden', |
505 | 505 |
'name': key, |
506 | 506 |
'value': params[key]} for key in params]) |
507 | 507 |
return reference, FORM, form |
508 | 508 | |
509 | 509 |
def response(self, query_string): |
510 | 510 |
params = urlparse.parse_qs(query_string, True) |
511 |
params = {key.upper(): params[key][0] for key in params}
|
|
511 |
params = dict((key.upper(), params[key][0]) for key in params)
|
|
512 | 512 |
reference = params['ORDERID'] |
513 | 513 |
transaction_id = params['PAYID'] |
514 | 514 |
status = params['STATUS'] |
515 | 515 |
error = params['NCERROR'] |
516 | 516 |
signed = False |
517 | 517 |
if self.sha_in: |
518 | 518 |
signature = params.get('SHASIGN') |
519 | 519 |
expected_signature = self.sha_sign_out(params) |
520 |
- |