summaryrefslogtreecommitdiffstats
path: root/eopayment/sips.py
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2016-03-09 21:31:40 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2016-03-09 21:31:40 (GMT)
commit60a71c626edb0114ec74fd924f7edfef796447f2 (patch)
tree8018989552c3b67d8025bfe850440d87f36e3046 /eopayment/sips.py
parent297e9a851455dace613a4f8615d65f383113eb74 (diff)
downloadeopayment-60a71c626edb0114ec74fd924f7edfef796447f2.zip
eopayment-60a71c626edb0114ec74fd924f7edfef796447f2.tar.gz
eopayment-60a71c626edb0114ec74fd924f7edfef796447f2.tar.bz2
general: check responses for required attributes as 1st processing step (#9729)
Diffstat (limited to 'eopayment/sips.py')
-rw-r--r--eopayment/sips.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/eopayment/sips.py b/eopayment/sips.py
index 301d414..ef5f1c6 100644
--- a/eopayment/sips.py
+++ b/eopayment/sips.py
@@ -9,7 +9,7 @@ import os.path
import uuid
import warnings
-from common import PaymentCommon, HTML, PaymentResponse
+from common import PaymentCommon, HTML, PaymentResponse, ResponseError
from cb import CB_RESPONSE_CODES
'''
@@ -159,6 +159,8 @@ class Payment(PaymentCommon):
def response(self, query_string, **kwargs):
form = urlparse.parse_qs(query_string)
+ if not DATA in form:
+ raise ResponseError()
params = {'message': form[DATA][0]}
result = self.execute('response', params)
d = dict(zip(RESPONSE_PARAMS, result))