Skip to content

Commit

Permalink
[IMP] Fix Refund method
Browse files Browse the repository at this point in the history
closes #84

X-original-commit: c954714
Signed-off-by: augusto-weiss <awe@adhoc.com.ar>
  • Loading branch information
maq-adhoc committed Apr 18, 2024
1 parent 8c96217 commit d917a7f
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions payment_mercadopago/models/payment_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _send_payment_request(self):
feedback_data = {'reference': self.reference, 'response': res_content}
self._handle_notification_data('mercadopago', feedback_data)

def _send_refund_request(self, amount_to_refund=None, create_refund_transaction=True):
def _send_refund_request(self, amount_to_refund=None):
""" Override of payment to send a refund request to MercadoPago.
Note: self.ensure_one()
Expand All @@ -92,14 +92,13 @@ def _send_refund_request(self, amount_to_refund=None, create_refund_transaction=
:return: The refund transaction if any
:rtype: recordset of `payment.transaction`
"""
if self.provider_code != 'mercadopago':
return super()._send_refund_request(
amount_to_refund=amount_to_refund,
create_refund_transaction=create_refund_transaction,
)

# TODO: implement
raise UserError("MercadoPago: _send_refund_request not implemented")
res = super()._send_refund_request(
amount_to_refund=amount_to_refund,
)
if self.provider_code == 'mercadopago':
# TODO: implement
raise UserError("MercadoPago: _send_refund_request not implemented")
return res

def _send_void_request(self):
""" Override of payment to send a void request to Authorize.
Expand Down

0 comments on commit d917a7f

Please sign in to comment.