summaryrefslogtreecommitdiffstats
path: root/eopayment/systempayv2.py
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2012-01-30 16:47:47 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2012-01-30 16:47:47 (GMT)
commita8f3dc72228d5c37fca45e95ec09aac0e95fe234 (patch)
treeb340a35278f877b91c6b6059bfffed9d991874a6 /eopayment/systempayv2.py
parentebabb949e3059f699fdcc8afd1c35e9080b221f3 (diff)
downloadeopayment-a8f3dc72228d5c37fca45e95ec09aac0e95fe234.zip
eopayment-a8f3dc72228d5c37fca45e95ec09aac0e95fe234.tar.gz
eopayment-a8f3dc72228d5c37fca45e95ec09aac0e95fe234.tar.bz2
copy the bank authorisation number into a common variable name
Each API has a way of transmitting the authorisation number, we copy to a common name when handling response messages.
Diffstat (limited to 'eopayment/systempayv2.py')
-rw-r--r--eopayment/systempayv2.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/eopayment/systempayv2.py b/eopayment/systempayv2.py
index 1a5a09c..9a5a374 100644
--- a/eopayment/systempayv2.py
+++ b/eopayment/systempayv2.py
@@ -16,6 +16,7 @@ PAYMENT_URL = "https://systempay.cyberpluspaiement.com/vads-payment/"
LOGGER = logging.getLogger(__name__)
SERVICE_URL = '???'
VADS_TRANS_DATE = 'vads_trans_date'
+VADS_AUTH_NUMBER = 'vads_auth_number'
def isonow():
return dt.datetime.now() \
@@ -266,6 +267,8 @@ parameters received: %s' % (name, kwargs))
result = signature == fields['signature']
LOGGER.debug('signature check result: %s' % result)
transaction_id = '%s_%s' % (copy[VADS_TRANS_DATE], copy[VADS_TRANS_ID])
+ # the VADS_AUTH_NUMBER is the number to match payment in bank logs
+ copy[self.BANK_ID] = copy.get(copy[VADS_AUTH_NUMBER], '')
return result, transaction_id, copy, None
def signature(self, fields):