summaryrefslogtreecommitdiffstats
path: root/eopayment/systempayv2.py
diff options
context:
space:
mode:
authorThomas NOEL <tnoel@entrouvert.com>2014-03-30 17:27:48 (GMT)
committerThomas NOEL <tnoel@entrouvert.com>2014-03-30 17:27:48 (GMT)
commitdb67c3887d635ee8126bbf95ed4571c8dc8adab4 (patch)
treeda342482200313f4414fb75c9f2076ffa1b3a7ce /eopayment/systempayv2.py
parent1ed33d046cc319d07c0f53338d6fdc17eab62135 (diff)
downloadeopayment-db67c3887d635ee8126bbf95ed4571c8dc8adab4.zip
eopayment-db67c3887d635ee8126bbf95ed4571c8dc8adab4.tar.gz
eopayment-db67c3887d635ee8126bbf95ed4571c8dc8adab4.tar.bz2
add response.test flag
on tipi, spplus and systempayv2 only.
Diffstat (limited to 'eopayment/systempayv2.py')
-rw-r--r--eopayment/systempayv2.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/eopayment/systempayv2.py b/eopayment/systempayv2.py
index e050714..438cc07 100644
--- a/eopayment/systempayv2.py
+++ b/eopayment/systempayv2.py
@@ -32,6 +32,7 @@ VADS_SITE_ID = 'vads_site_id'
VADS_TRANS_ID = 'vads_trans_id'
SIGNATURE = 'signature'
VADS_TRANS_ID = 'vads_trans_id'
+VADS_CTX_MODE = 'vads_ctx_mode'
def isonow():
@@ -353,6 +354,7 @@ class Payment(PaymentCommon):
result = PAID
else:
result = ERROR
+ test = fields[VADS_CTX_MODE] == 'TEST'
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(VADS_AUTH_NUMBER, '')
@@ -362,7 +364,8 @@ class Payment(PaymentCommon):
bank_data=copy,
order_id=transaction_id,
transaction_id=copy.get(VADS_AUTH_NUMBER),
- bank_status=' - '.join(bank_status))
+ bank_status=' - '.join(bank_status),
+ test=test)
return response
def signature(self, fields):