Skip to content

Commit

Permalink
[FIX] FIX _process_feedback_data when The TX is already done
Browse files Browse the repository at this point in the history
  • Loading branch information
filoquin committed Sep 30, 2022
1 parent 112d00f commit 450310d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion payment_mercadopago/models/payment_transaction.py
Expand Up @@ -156,7 +156,10 @@ def _process_feedback_data(self, data):
status = response_content.get('status')
message = self._get_mercadopago_response_msg(response_content)
if status in ['approved', 'processed']: # Approved
self._set_done(state_message=message)
if self.state != 'done':
self._set_done(state_message=message)
else:
_logger.info('The TX %s is already done. Cant set done twise' % self.reference)
if self.tokenize and not self.token_id:
self._mercadopago_tokenize_from_feedback_data(response_content)
elif status in ['authorized']: # Authorized: the card validation is ok
Expand Down

0 comments on commit 450310d

Please sign in to comment.