def METHOD_NAME(self):
    # typical data posted by Redsys after client has successfully paid
    # redsys not authorisation code
    values = {
        "Ds_Order": "Valid transaction",
        "Ds_AuthorisationCode": "",
    }
    post_data = self._prepare_post_data(values)
    with self.assertRaises(ValidationError):
        self.env["payment.transaction"]._handle_notification_data(
            "redsys", post_data
        )
    # Valid transaction. status: done
    tx = self._create_transaction(flow="redirect", reference="Valid transaction")
    values = {
        "Ds_Order": tx.reference,
        "Ds_AuthorisationCode": "999999",
        "Ds_Response": "100",
    }
    post_data = self._prepare_post_data(values)
    tx._handle_notification_data("redsys", post_data)
    self.assertEqual(
        tx.state, "done", "Redsys: validation did not put tx into done state"
    )
    # No valid card transaction. status: pending
    tx = self._create_transaction(flow="redirect", reference="Pending transaction")
    values = {
        "Ds_Order": tx.reference,
        "Ds_AuthorisationCode": "999999",
        "Ds_Response": "203",
    }
    post_data = self._prepare_post_data(values)
    tx._handle_notification_data("redsys", post_data)
    self.assertEqual(tx.state, "pending", "Redsys: pending transaction status")
    # Cancel status
    tx = self._create_transaction(flow="redirect", reference="Cancel transaction")
    values = {
        "Ds_Order": tx.reference,
        "Ds_AuthorisationCode": "999999",
        "Ds_Response": "913",
    }
    post_data = self._prepare_post_data(values)
    tx._handle_notification_data("redsys", post_data)
    self.assertEqual(tx.state, "cancel", "Redsys: 913-9912 generic invalid card")
    # Error transction status
    tx = self._create_transaction(flow="redirect", reference="Error transaction")
    values = {
        "Ds_Order": tx.reference,
        "Ds_AuthorisationCode": "999999",
        "Ds_Response": "9999",
    }
    post_data = self._prepare_post_data(values)
    tx._handle_notification_data("redsys", post_data)
    self.assertEqual(tx.state, "error", "Redsys: response error")