Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Colaboración Paypal con ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 20-09-2021
Ramon88 Ramon88 is offline
Miembro
 
Registrado: ago 2021
Posts: 157
Poder: 5
Ramon88 Va por buen camino
Api...

Alguien conoce Binovo ??
Tienen una API que funciona con JSON.



Estoy de reunión con ellos y aseguran que Álava va a funcionar exactamente igual que guipuzkoa.
Responder Con Cita
  #2  
Antiguo 20-09-2021
ermendalenda ermendalenda is offline
Miembro
 
Registrado: ago 2021
Posts: 2.761
Poder: 7
ermendalenda Va por buen camino
Cita:
Empezado por Ramon88 Ver Mensaje
Alguien conoce Binovo ??
Tienen una API que funciona con JSON.



Estoy de reunión con ellos y aseguran que Álava va a funcionar exactamente igual que guipuzkoa.
Sí, parecen serios, estarás tratando con Juanjo.
Su Api arranca sobre un contenedor Docker (para ello necesitaras unos requisitos mínimos de sistema, memoria suficiente, S.O windows 10, linux..) le mandas la info en JSON (creo que admitenotros formatos) y te devuelven la imagen Qr, el identificador Qr y la api se encarga del control del envio.
Buena Solución si no te quieres pringar demasiado a un coste razonable y te olvidas de las actualizaciones que te haran/daran ellos mientras tengas el mantenimiento.

A mi me gusta tener el toro por los cuernos pero no descarto, si se me complica, poner la api de ellos.
Responder Con Cita
  #3  
Antiguo 21-09-2021
Ramon88 Ramon88 is offline
Miembro
 
Registrado: ago 2021
Posts: 157
Poder: 5
Ramon88 Va por buen camino
Cita:
Empezado por ermendalenda Ver Mensaje
Sí, parecen serios, estarás tratando con Juanjo.
Su Api arranca sobre un contenedor Docker (para ello necesitaras unos requisitos mínimos de sistema, memoria suficiente, S.O windows 10, linux..) le mandas la info en JSON (creo que admitenotros formatos) y te devuelven la imagen Qr, el identificador Qr y la api se encarga del control del envio.
Buena Solución si no te quieres pringar demasiado a un coste razonable y te olvidas de las actualizaciones que te haran/daran ellos mientras tengas el mantenimiento.

A mi me gusta tener el toro por los cuernos pero no descarto, si se me complica, poner la api de ellos.



No me ha parecido muy economico, por no decir nada...

Vamos por ese dinero tengo un trabajador haciéndolo... Es mi opinión.


El problema de hacerlo es el tiempo que esto implica, que antes me subia bien el XML ahora no, por que? no lo se... es una jodienda de la buenas.
Responder Con Cita
  #4  
Antiguo 21-09-2021
ermendalenda ermendalenda is offline
Miembro
 
Registrado: ago 2021
Posts: 2.761
Poder: 7
ermendalenda Va por buen camino
Cita:
Empezado por Ramon88 Ver Mensaje
No me ha parecido muy economico, por no decir nada...

Vamos por ese dinero tengo un trabajador haciéndolo... Es mi opinión.


El problema de hacerlo es el tiempo que esto implica, que antes me subia bien el XML ahora no, por que? no lo se... es una jodienda de la buenas.
bueno, ya te digo que esto no es un trabajo para un mes, pero bueno, creo que en el foro hay alguien más que te puede ofrecer el servicio y además creo que no necesita tantos requisitos de sistema
Responder Con Cita
  #5  
Antiguo 21-09-2021
Ramon88 Ramon88 is offline
Miembro
 
Registrado: ago 2021
Posts: 157
Poder: 5
Ramon88 Va por buen camino
Bueno, intentaremos sacarlo...


Alguien tiene la clase para calcular CRC8 en .Net o c#??
Responder Con Cita
  #6  
Antiguo 21-09-2021
ermendalenda ermendalenda is offline
Miembro
 
Registrado: ago 2021
Posts: 2.761
Poder: 7
ermendalenda Va por buen camino
Cita:
Empezado por Ramon88 Ver Mensaje
Bueno, intentaremos sacarlo...


Alguien tiene la clase para calcular CRC8 en .Net o c#??

En Vb cambiando poca cosa te vale para net:
Código:
Private Declare Function WideCharToMultiByte Lib "kernel32" ( _
    ByVal CodePage As Long, _
    ByVal dwFlags As Long, _
    ByVal lpWideCharStr As Long, _
    ByVal cchWideChar As Long, _
    ByVal lpMultiByteStr As Long, _
    ByVal cbMultiByte As Long, _
    ByVal lpDefaultChar As Long, _
    ByVal lpUsedDefaultChar As Long) As Long

Dim CRC8_Table As Variant
' CodePage constant for UTF-8
Private Const CP_UTF8 = 65001

''' Return byte array with VBA "Unicode" string encoded in UTF-8
Function Utf8BytesFromString(strInput As String) As Variant
    Dim nBytes As Long
    ' Catch empty or null input string
    Utf8BytesFromString = vbNullString
    If Len(strInput) < 1 Then Exit Function
    ' Get length in bytes *including* terminating null
    nBytes = WideCharToMultiByte(CP_UTF8, 0&, ByVal StrPtr(strInput), -1, 0&, 0&, 0&, 0&)
    ' We don't want the terminating null in our byte array, so ask for `nBytes-1` bytes
    Dim abBuffer() As Byte
    
    ReDim abBuffer(nBytes - 2)  ' NB ReDim with one less byte than you need
    nBytes = WideCharToMultiByte(CP_UTF8, 0&, ByVal StrPtr(strInput), -1, ByVal VarPtr(abBuffer(0)), nBytes - 1, 0&, 0&)
    Utf8BytesFromString = abBuffer
End Function


Public Function crc8(buffer As String, Polynom, Initial As Variant) As Variant
CRC8_Table = Array(&H0, &H7, &HE, &H9, &H1C, &H1B, &H12, &H15, _
    &H38, &H3F, &H36, &H31, &H24, &H23, &H2A, &H2D, &H70, &H77, &H7E, &H79, &H6C, &H6B, &H62, &H65, _
    &H48, &H4F, &H46, &H41, &H54, &H53, &H5A, &H5D, &HE0, &HE7, &HEE, &HE9, &HFC, &HFB, &HF2, &HF5, _
    &HD8, &HDF, &HD6, &HD1, &HC4, &HC3, &HCA, &HCD, &H90, &H97, &H9E, &H99, &H8C, &H8B, &H82, &H85, _
    &HA8, &HAF, &HA6, &HA1, &HB4, &HB3, &HBA, &HBD, &HC7, &HC0, &HC9, &HCE, &HDB, &HDC, &HD5, &HD2, _
    &HFF, &HF8, &HF1, &HF6, &HE3, &HE4, &HED, &HEA, &HB7, &HB0, &HB9, &HBE, &HAB, &HAC, &HA5, &HA2, _
    &H8F, &H88, &H81, &H86, &H93, &H94, &H9D, &H9A, &H27, &H20, &H29, &H2E, &H3B, &H3C, &H35, &H32, _
    &H1F, &H18, &H11, &H16, &H3, &H4, &HD, &HA, &H57, &H50, &H59, &H5E, &H4B, &H4C, &H45, &H42, _
    &H6F, &H68, &H61, &H66, &H73, &H74, &H7D, &H7A, &H89, &H8E, &H87, &H80, &H95, &H92, &H9B, &H9C, _
    &HB1, &HB6, &HBF, &HB8, &HAD, &HAA, &HA3, &HA4, &HF9, &HFE, &HF7, &HF0, &HE5, &HE2, &HEB, &HEC, _
    &HC1, &HC6, &HCF, &HC8, &HDD, &HDA, &HD3, &HD4, &H69, &H6E, &H67, &H60, &H75, &H72, &H7B, &H7C, _
    &H51, &H56, &H5F, &H58, &H4D, &H4A, &H43, &H44, &H19, &H1E, &H17, &H10, &H5, &H2, &HB, &HC, _
    &H21, &H26, &H2F, &H28, &H3D, &H3A, &H33, &H34, &H4E, &H49, &H40, &H47, &H52, &H55, &H5C, &H5B, _
    &H76, &H71, &H78, &H7F, &H6A, &H6D, &H64, &H63, &H3E, &H39, &H30, &H37, &H22, &H25, &H2C, &H2B, _
    &H6, &H1, &H8, &HF, &H1A, &H1D, &H14, &H13, &HAE, &HA9, &HA0, &HA7, &HB2, &HB5, &HBC, &HBB, _
    &H96, &H91, &H98, &H9F, &H8A, &H8D, &H84, &H83, &HDE, &HD9, &HD0, &HD7, &HC2, &HC5, &HCC, &HCB, _
    &HE6, &HE1, &HE8, &HEF, &HFA, &HFD, &HF4, &HF3)
 
  Dim data As Variant
    data = Utf8BytesFromString(buffer)
  Dim alen, i As Integer
  Dim crc As Byte
  'data = Buffer ':= TEncoding.UTF8.GetBytes(Cadena);
  alen = UBound(data)
  crc = 0
    
  For i = 0 To alen
    crc = CRC8_Table((crc Xor data(i)) And &HFF)
   
Next
    crc8 = crc And &HFF



End Function

Para llamar a la función y que te devuelva en cr8:
cr8 = crc8(Cadena_enviada, 7, 0)


iNITIAL Y POLYNOM CREO QUE PUEDES OBVIARLAS

Última edición por ermendalenda fecha: 21-09-2021 a las 19:47:12.
Responder Con Cita
  #7  
Antiguo 22-09-2021
Ramon88 Ramon88 is offline
Miembro
 
Registrado: ago 2021
Posts: 157
Poder: 5
Ramon88 Va por buen camino
Cita:
Empezado por ermendalenda Ver Mensaje
En Vb cambiando poca cosa te vale para net:
Código:
Private Declare Function WideCharToMultiByte Lib "kernel32" ( _
    ByVal CodePage As Long, _
    ByVal dwFlags As Long, _
    ByVal lpWideCharStr As Long, _
    ByVal cchWideChar As Long, _
    ByVal lpMultiByteStr As Long, _
    ByVal cbMultiByte As Long, _
    ByVal lpDefaultChar As Long, _
    ByVal lpUsedDefaultChar As Long) As Long

Dim CRC8_Table As Variant
' CodePage constant for UTF-8
Private Const CP_UTF8 = 65001

''' Return byte array with VBA "Unicode" string encoded in UTF-8
Function Utf8BytesFromString(strInput As String) As Variant
    Dim nBytes As Long
    ' Catch empty or null input string
    Utf8BytesFromString = vbNullString
    If Len(strInput) < 1 Then Exit Function
    ' Get length in bytes *including* terminating null
    nBytes = WideCharToMultiByte(CP_UTF8, 0&, ByVal StrPtr(strInput), -1, 0&, 0&, 0&, 0&)
    ' We don't want the terminating null in our byte array, so ask for `nBytes-1` bytes
    Dim abBuffer() As Byte
    
    ReDim abBuffer(nBytes - 2)  ' NB ReDim with one less byte than you need
    nBytes = WideCharToMultiByte(CP_UTF8, 0&, ByVal StrPtr(strInput), -1, ByVal VarPtr(abBuffer(0)), nBytes - 1, 0&, 0&)
    Utf8BytesFromString = abBuffer
End Function


Public Function crc8(buffer As String, Polynom, Initial As Variant) As Variant
CRC8_Table = Array(&H0, &H7, &HE, &H9, &H1C, &H1B, &H12, &H15, _
    &H38, &H3F, &H36, &H31, &H24, &H23, &H2A, &H2D, &H70, &H77, &H7E, &H79, &H6C, &H6B, &H62, &H65, _
    &H48, &H4F, &H46, &H41, &H54, &H53, &H5A, &H5D, &HE0, &HE7, &HEE, &HE9, &HFC, &HFB, &HF2, &HF5, _
    &HD8, &HDF, &HD6, &HD1, &HC4, &HC3, &HCA, &HCD, &H90, &H97, &H9E, &H99, &H8C, &H8B, &H82, &H85, _
    &HA8, &HAF, &HA6, &HA1, &HB4, &HB3, &HBA, &HBD, &HC7, &HC0, &HC9, &HCE, &HDB, &HDC, &HD5, &HD2, _
    &HFF, &HF8, &HF1, &HF6, &HE3, &HE4, &HED, &HEA, &HB7, &HB0, &HB9, &HBE, &HAB, &HAC, &HA5, &HA2, _
    &H8F, &H88, &H81, &H86, &H93, &H94, &H9D, &H9A, &H27, &H20, &H29, &H2E, &H3B, &H3C, &H35, &H32, _
    &H1F, &H18, &H11, &H16, &H3, &H4, &HD, &HA, &H57, &H50, &H59, &H5E, &H4B, &H4C, &H45, &H42, _
    &H6F, &H68, &H61, &H66, &H73, &H74, &H7D, &H7A, &H89, &H8E, &H87, &H80, &H95, &H92, &H9B, &H9C, _
    &HB1, &HB6, &HBF, &HB8, &HAD, &HAA, &HA3, &HA4, &HF9, &HFE, &HF7, &HF0, &HE5, &HE2, &HEB, &HEC, _
    &HC1, &HC6, &HCF, &HC8, &HDD, &HDA, &HD3, &HD4, &H69, &H6E, &H67, &H60, &H75, &H72, &H7B, &H7C, _
    &H51, &H56, &H5F, &H58, &H4D, &H4A, &H43, &H44, &H19, &H1E, &H17, &H10, &H5, &H2, &HB, &HC, _
    &H21, &H26, &H2F, &H28, &H3D, &H3A, &H33, &H34, &H4E, &H49, &H40, &H47, &H52, &H55, &H5C, &H5B, _
    &H76, &H71, &H78, &H7F, &H6A, &H6D, &H64, &H63, &H3E, &H39, &H30, &H37, &H22, &H25, &H2C, &H2B, _
    &H6, &H1, &H8, &HF, &H1A, &H1D, &H14, &H13, &HAE, &HA9, &HA0, &HA7, &HB2, &HB5, &HBC, &HBB, _
    &H96, &H91, &H98, &H9F, &H8A, &H8D, &H84, &H83, &HDE, &HD9, &HD0, &HD7, &HC2, &HC5, &HCC, &HCB, _
    &HE6, &HE1, &HE8, &HEF, &HFA, &HFD, &HF4, &HF3)
 
  Dim data As Variant
    data = Utf8BytesFromString(buffer)
  Dim alen, i As Integer
  Dim crc As Byte
  'data = Buffer ':= TEncoding.UTF8.GetBytes(Cadena);
  alen = UBound(data)
  crc = 0
    
  For i = 0 To alen
    crc = CRC8_Table((crc Xor data(i)) And &HFF)
   
Next
    crc8 = crc And &HFF



End Function
Para llamar a la función y que te devuelva en cr8:
cr8 = crc8(Cadena_enviada, 7, 0)


iNITIAL Y POLYNOM CREO QUE PUEDES OBVIARLAS

Pues te lo agradezco muchisimo! me esta dando fallo en la linea

Código:
nBytes = WideCharToMultiByte(CP_UTF8, 0&, ByVal StrPtr(strInput), -1, 0&, 0&, 0&, 0&)
Exactamente en WideCharToMultiByte
Subo la funcion en si:
Código:
 Private Declare Function WideCharToMultiByte Lib "kernel32" (
      ByVal CodePage As Long,
      ByVal dwFlags As Long,
      ByVal lpWideCharStr As Long,
      ByVal cchWideChar As Long,
      ByVal lpMultiByteStr As Long,
      ByVal cbMultiByte As Long,
      ByVal lpDefaultChar As Long,
      ByVal lpUsedDefaultChar As Long) As Long

    Dim CRC8_Table As Object
    ' CodePage constant for UTF-8
    Private Const CP_UTF8 = 65001
Tambien me da error aqui(Exactamente en Array(Es un tipo de clase y no se puede usar como una expresion)):
Código:
Public Function crc8(buffer As String, Polynom As Object, Initial As Object) As Object
        CRC8_Table = Array(&H0, &H7, &HE, &H9, &H1C, &H1B, &H12, &H15,
            &H38, &H3F, &H36, &H31, &H24, &H23, &H2A, &H2D, &H70, &H77, &H7E, &H79, &H6C, &H6B, &H62, &H65,
            &H48, &H4F, &H46, &H41, &H54, &H53, &H5A, &H5D, &HE0, &HE7, &HEE, &HE9, &HFC, &HFB, &HF2, &HF5,
            &HD8, &HDF, &HD6, &HD1, &HC4, &HC3, &HCA, &HCD, &H90, &H97, &H9E, &H99, &H8C, &H8B, &H82, &H85,
            &HA8, &HAF, &HA6, &HA1, &HB4, &HB3, &HBA, &HBD, &HC7, &HC0, &HC9, &HCE, &HDB, &HDC, &HD5, &HD2,
            &HFF, &HF8, &HF1, &HF6, &HE3, &HE4, &HED, &HEA, &HB7, &HB0, &HB9, &HBE, &HAB, &HAC, &HA5, &HA2,
            &H8F, &H88, &H81, &H86, &H93, &H94, &H9D, &H9A, &H27, &H20, &H29, &H2E, &H3B, &H3C, &H35, &H32,
            &H1F, &H18, &H11, &H16, &H3, &H4, &HD, &HA, &H57, &H50, &H59, &H5E, &H4B, &H4C, &H45, &H42,
            &H6F, &H68, &H61, &H66, &H73, &H74, &H7D, &H7A, &H89, &H8E, &H87, &H80, &H95, &H92, &H9B, &H9C,
            &HB1, &HB6, &HBF, &HB8, &HAD, &HAA, &HA3, &HA4, &HF9, &HFE, &HF7, &HF0, &HE5, &HE2, &HEB, &HEC,
            &HC1, &HC6, &HCF, &HC8, &HDD, &HDA, &HD3, &HD4, &H69, &H6E, &H67, &H60, &H75, &H72, &H7B, &H7C,
            &H51, &H56, &H5F, &H58, &H4D, &H4A, &H43, &H44, &H19, &H1E, &H17, &H10, &H5, &H2, &HB, &HC,
            &H21, &H26, &H2F, &H28, &H3D, &H3A, &H33, &H34, &H4E, &H49, &H40, &H47, &H52, &H55, &H5C, &H5B,
            &H76, &H71, &H78, &H7F, &H6A, &H6D, &H64, &H63, &H3E, &H39, &H30, &H37, &H22, &H25, &H2C, &H2B,
            &H6, &H1, &H8, &HF, &H1A, &H1D, &H14, &H13, &HAE, &HA9, &HA0, &HA7, &HB2, &HB5, &HBC, &HBB,
            &H96, &H91, &H98, &H9F, &H8A, &H8D, &H84, &H83, &HDE, &HD9, &HD0, &HD7, &HC2, &HC5, &HCC, &HCB,
            &HE6, &HE1, &HE8, &HEF, &HFA, &HFD, &HF4, &HF3)

        Dim data As Object
        data = Utf8BytesFromString(buffer)
        Dim alen, i As Integer
        Dim crc As Byte
        'data = Buffer ':= TEncoding.UTF8.GetBytes(Cadena);
        alen = UBound(data)
        crc = 0

        For i = 0 To alen
            crc = CRC8_Table((crc Xor data(i)) And &HFF)

        Next

        crc8 = crc And &HFF

    End Function
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
SII -Nuevo sistema de la Agencia Tributaria española de envío de datos vía Webservice newtron Internet 3716 19-01-2026 20:01:34
Como utilizar la ayuda del nuevo Sistema Operativo gluglu Humor 3 24-09-2007 09:39:05
Aplicacion Agencia De Viajes ArdiIIa Varios 9 20-01-2007 16:49:53
El Vasco Aguirre Al González La Taberna 5 26-05-2006 09:22:28
Microsoft ha lanzado su nuevo sistema operativo DarkByte Humor 0 25-01-2004 09:21:14


La franja horaria es GMT +2. Ahora son las 04:09:59.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi