0002-eopayment-transaction_id-must-always-be-equals-to-re.patch
eopayment/tipi.py | ||
---|---|---|
118 | 118 |
objet = orderid + (' ' + objet) if objet else '' |
119 | 119 |
if not refdet: |
120 | 120 |
refdet = self._generate_refdet() |
121 |
transaction_id = refdet |
|
122 |
else: |
|
123 |
transaction_id = '%s_%s' % (refdet, random.randint(1, 1000000000)) |
|
121 |
transaction_id = refdet |
|
124 | 122 |
# check objet or fix objet |
125 | 123 |
if objet is not None: |
126 | 124 |
try: |
... | ... | |
163 | 161 |
raise ResponseError('missing refdet or resultrans') |
164 | 162 |
for key, value in fields.items(): |
165 | 163 |
fields[key] = value[0] |
166 |
refdet = fields.get('refdet')
|
|
167 |
if refdet is None:
|
|
164 |
transaction_id = fields.get('refdet')
|
|
165 |
if transaction_id is None:
|
|
168 | 166 |
raise ResponseError('refdet is missing') |
169 |
if 'objet' in fields: |
|
170 |
iso_now = fields['objet'] |
|
171 |
else: |
|
172 |
iso_now = isonow() |
|
173 |
transaction_id = '%s_%s' % (iso_now, refdet) |
|
174 | 167 | |
175 | 168 |
result = fields.get('resultrans') |
176 | 169 |
if result == 'P': |
177 |
- |