def METHOD_NAME(self, data):
    super().METHOD_NAME(data)
    if self.provider_code != "redsys":
        return
    params = self.merchant_params_json2dict(data)
    status_code = int(params.get("Ds_Response", "29999"))
    state = self._get_redsys_state(status_code)
    vals = {
        "state": state,
        "redsys_txnid": params.get("Ds_AuthorisationCode"),
        "create_date": fields.Datetime.now(),
    }
    state_message = ""
    feedback_error = False
    if state == "done":
        vals["state_message"] = _("Ok: %s") % params.get("Ds_Response")
        self._set_done()
        self._finalize_post_processing()
    elif state == "pending":  # 'Payment error: code: %s.'
        state_message = _("Error: %(status_code)s (%(error_code)s)")
        self._set_pending()
    elif state == "cancel":  # 'Payment error: bank unavailable.'
        state_message = _("Bank Error: %(status_code)s (%(error_code)s)")
        self._set_canceled()
    else:
        state_message = _(
            "Redsys: feedback error: %(status_code)s (%(error_code)s)"
        )
        self._set_error(state_message)
        feedback_error = True
    if state_message:
        vals["state_message"] = state_message % {
            "status_code": params.get("Ds_Response"),
            "error_code": params.get("Ds_ErrorCode"),
        }
        if state == "error":
            _logger.warning(vals["state_message"])
        if feedback_error:
            self._set_error(state_message)
    self.write(vals)