Skip to content
Permalink
Browse files

[FIX] payment_payulatam: fix transaction reconsiliation

The reconsiliation code was looking for the aquirer_reference instead of
the reference to find out the corresponding transaction. Which leads to
not finding the corresponding transaction.

This behavior comes from the creation of the moule setting its own tests
in error in PR: #24802

closes #31365
  • Loading branch information...
pimodoo committed Feb 22, 2019
1 parent b13305f commit 7def0f22084a454367839c5413743301e8f953a7
Showing with 2 additions and 3 deletions.
  1. +1 −1 addons/payment_payulatam/models/payment.py
  2. +1 −2 addons/payment_payulatam/tests/test_payulatam.py
@@ -82,7 +82,7 @@ def _payulatam_form_get_tx_from_data(self, data):
if not reference or not txnid or not sign:
raise ValidationError(_('PayUlatam: received data with missing reference (%s) or transaction id (%s) or sign (%s)') % (reference, txnid, sign))

transaction = self.search([('acquirer_reference', '=', reference)])
transaction = self.search([('reference', '=', reference)])

if not transaction:
error_msg = (_('PayUlatam: received data for reference %s; no order found') % (reference))
@@ -121,10 +121,9 @@ def test_20_payulatam_form_management(self):
'amount': 0.01,
'acquirer_id': self.payulatam.id,
'currency_id': self.currency_euro.id,
'reference': 'test_ref_2',
'reference': 'test_ref_10',
'partner_name': 'Norbert Buyer',
'partner_country_id': self.country_france.id,
'acquirer_reference': 'test_ref_10',
'partner_id': self.buyer_id})

# validate transaction

0 comments on commit 7def0f2

Please sign in to comment.
You can’t perform that action at this time.