by postinelli » Thu Jan 14, 2021 8:34 pm
//----------------------------------------------------------------------------//
function GeneraQR()
Local cOrigen, cJason, cDestino, ElTxt
cOrigen:="https://www.afip.gob.ar/fe/qr/?p="
cJason:='{"ver":1,"fecha":"2020-10-13","cuit":30000000007,"ptoVta":10,"tipoCmp":1,"nroCmp":94,"importe":12100,"moneda":"DOL","ctz":65,"tipoDocRec":80,"nroDocRec":20000000001,"tipoCodAut":"E","codAut":70417054367476}'
cJason=StrToBase64( cJason )
cOrigen=cOrigen+cJason
//MsgAlert(cOrigen)
ElTxt:= "QrJason.txt"
Nhandle:= fcreate(ElTxt)
If (nhandle > 0)
fwrite(Nhandle, cOrigen + CRLF)
fclose(nhandle)
EndIf
cDestino:="FastQR.jpg"
QRCode(cOrigen,cDestino)
MsgInfo("Qr Generado OK")
Return NIL
//----------------------------------------------------------------------------//
DLL32 STATIC FUNCTION QRCode(cStr As STRING, cFile As STRING) AS LONG PASCAL FROM "FastQRCode" LIB "QRCodelib.Dll"
RETURN NIL
/*