Problems with generate QR code to print on thermal printer via RS232 port

I have a code that generates an EAN13 barcode and prints it by serial thermal printer with additional text. NOTE: The printer is not adafruit, but Epson type.
I have tried to generate QR code that prints a 24-digit string, but it does not generate it. I have read several posts and searched the internet trying to implement the proposed solutions but still does not generate the QR Code and only prints the character string in text mode.
I would appreciate if someone could support me (I attached part of the code):

#include "qrcode.h" 

QRCode qrcode;
SoftwareSerial RS232(38, 40);

void setup() {
  RS232.begin(115200);
  Serial.begin(9600);
  uint32_t dt = millis();

//Resumen: Este metodo imprime el boleto
void Escribir_Puerto_Serial() {
  String hora_fecha = "Entrada " + obtFecha() + "           " + obtHora();
  sprintf(buffer, "%06d", folio_int);
  
  String msj = obtFechaInversa() + obtHoraFilemaker() + 703 + num_entrada + buffer ;
  String folio_boleto = "Folio " + String(folio_int);
  String equipo_entrada = "Entrada " + String(num_entrada);
  char CodigoQrId[25];
  msj.toCharArray(CodigoQrId,25);

// Create the QR code
    QRCode qrcode;
    uint8_t qrcodeData[qrcode_getBufferSize(3)];
    qrcode_initText(&qrcode, qrcodeData, 3, 0, CodigoQrId);
  
  byte _nombre_empresa[nombre_empresa.length()];
  byte _direccion_empresa[direccion_empresa.length()];
  byte _hora_fecha[hora_fecha.length()];
  byte _leyenda_1[leyenda_1.length()];
  byte _leyenda_2[leyenda_2.length()];
  byte _folio_boleto[folio_boleto.length()];
  byte _equipo_entrada[equipo_entrada.length()];
  
  byte cmd_latin[3] = {0x1b, 0x52, 0x0c};
  byte cmd_salto[4] = {0x1d, 0x61, 0xff, 0x0a};
  byte cmd_salto2[2] = {0x0a, 0x0a};
  
  byte cmd_alineacion_centrada[3] = {0x1b, 0x61, 0x01}; 
  byte cmd_alineacion_izquierda[3] = {0x1b, 0x61, 0x00};
  byte cmd_alineacion_derecha[3] = {0x1b, 0x61, 0x02};

  byte cmd_fuente_a[3] = {0x1b, 0x21, 0x00};
  byte cmd_fuente_b[3] = {0x1b, 0x21, 0x01};
  byte cmd_negrita[3] = {0x1b, 0x45, 0x01};
  byte cmd_subrayar[3] = {0x1b, 0x2d, 0x01};
  byte cmd_tam[3] = {0x1d, 0x21, 0x11};
  byte cmd_print_mode[3] = {0x1b, 0x21, 0x20};
  
  //byte cmd_barcode_init[4] = {0x1d, 0x6b, 0x43, 0x0d};    //codigo de barras EAN13
  byte cmd_barcode_init[8] = {0x1d, 0x28, 0x6b, 0x03, 0x00, 0x31, 0x43, 0x03};
  byte cmd_barcode_height[3] = {0x1d, 0x68, 0x55};
  byte cmd_barcode_width[3] = {0x1d, 0x77, 0x03};
  byte cmd_info_barcode[24];
  
  byte cmd_cortar[5] = {0x0a, 0x1d, 0x56, 0x42, 0x00};

  ConvertirASCIIToBYTE(CodigoQrId, cmd_info_barcode);
  //cmd_info_barcode[12] = check_digit(msj);   //Check digit codigo de barras EAN13
  
  ConvertirASCIIToBYTE(nombre_empresa, _nombre_empresa);
  ConvertirASCIIToBYTE(direccion_empresa, _direccion_empresa);
  ConvertirASCIIToBYTE(hora_fecha, _hora_fecha);
  ConvertirASCIIToBYTE(leyenda_1, _leyenda_1);
  ConvertirASCIIToBYTE(leyenda_2, _leyenda_2);
  ConvertirASCIIToBYTE(folio_boleto, _folio_boleto);
  ConvertirASCIIToBYTE(equipo_entrada, _equipo_entrada);
  
  RS232.write(cmd_latin, sizeof(cmd_latin));
  RS232.write(cmd_tam, sizeof(cmd_tam));
  RS232.write(cmd_alineacion_centrada, sizeof(cmd_alineacion_centrada));
  RS232.write(cmd_fuente_a, sizeof(cmd_fuente_a));
  RS232.write(cmd_negrita, sizeof(cmd_negrita));
  RS232.write(_nombre_empresa, sizeof(_nombre_empresa));
  
  RS232.write(cmd_fuente_b, sizeof(cmd_fuente_b));
  RS232.write(cmd_negrita, sizeof(cmd_negrita));
  RS232.write(_direccion_empresa, sizeof(_direccion_empresa));
  
  RS232.write(cmd_fuente_a, sizeof(cmd_fuente_a));
  RS232.write(cmd_negrita, sizeof(cmd_negrita));
  RS232.write(_hora_fecha, sizeof(_hora_fecha));
  RS232.write(cmd_salto, sizeof(cmd_salto));
  RS232.write(cmd_salto, sizeof(cmd_salto));
  RS232.write(cmd_barcode_height, sizeof(cmd_barcode_height));
  RS232.write(cmd_barcode_width, sizeof(cmd_barcode_width));  
  RS232.write(cmd_barcode_init, sizeof(cmd_barcode_init));
  RS232.write(cmd_info_barcode, sizeof(cmd_info_barcode));
  RS232.write(cmd_alineacion_centrada, sizeof(cmd_alineacion_centrada));
  RS232.write(cmd_salto, sizeof(cmd_salto));
  RS232.write(cmd_info_barcode, sizeof(cmd_info_barcode));
  RS232.write(cmd_salto, sizeof(cmd_salto));
  RS232.write(cmd_fuente_b, sizeof(cmd_fuente_b));
  RS232.write(cmd_salto, sizeof(cmd_salto));
  RS232.write(cmd_alineacion_izquierda, sizeof(cmd_alineacion_izquierda));
  RS232.write(_leyenda_2, sizeof(_leyenda_2));
  RS232.write(cmd_salto, sizeof(cmd_salto));
  RS232.write(cmd_alineacion_centrada, sizeof(cmd_alineacion_centrada));
  RS232.write(cmd_salto, sizeof(cmd_salto));
  RS232.write(_folio_boleto, sizeof(_folio_boleto));
  //232.write(cmd_salto, sizeof(cmd_salto));
  RS232.write(_equipo_entrada, sizeof(_equipo_entrada));
  RS232.write(cmd_cortar, sizeof(cmd_cortar));
SoftwareSerial RS232(38, 40);

Why are you using software serial on an Arduino with multiple hardware serial ports?

  RS232.begin(115200);

Expecting software serial to work reliably at that baud rate is unrealistic.

  String hora_fecha = "Entrada " + obtFecha() + "           " + obtHora();

You are wasting resources with the String class. Stop using the String class. Period.

  char CodigoQrId[25];
  msj.toCharArray(CodigoQrId,25);

You can't put 25 characters and a terminating NULL in a 25 element array.

I attached part of the code

I left out part of my reply, too.

Dear PaulS, excuse some of the ignorance. In my time of engineering studies there was no Arduino and I'm just starting with it.
I modified the file according to posts and links to create QR code.
With printing on EAN13 it has linked everything well although as you comment (and I appreciate it) I understand there are quite a few code errors.
I enclose all the code I use with Arduino Mega and an RS232 port thermal printer which prints according to hexadecimal commands. The code I put in the code are those indicated by the manufacturer to print a QR barcode.

Boton_v0.20_Pensionados.ino (33.3 KB)