BOM dia
exibir o CRCode no video e verificar se caiu no banco
sabem de algum api preço etc ?
que possa ser integrada com o meu sistema
Ob

Moderador: Moderadores
Itamar M. Lins Jr. escreveu:Olá!
Veja ai.
Tem como desenvolver 100% no Harbour usando a \contrib\hbzebra. EU NÃO SEI FAZER ISSO.
https://www.bcb.gov.br/content/estabilidadefinanceira/spb_docs/ManualBRCode.pdf
Via VBA e EXCEL tem exemplos na internet e
Saudações,
Itamar M. Lins Jr.
#include "hbextcdp.ch"
hb_cdpselect("UTF8EX")
/*
Para testar a chave use o site:
https://www.gerarpix.com.br/
*/
Private cString
cString := ""
nResult := 0
brcode_generator()
//cCommand := 'qrencode -m 2 -l H -t utf8 "https://superuser.com"'
cCommand := 'curl qrcode.show -d' + '"' + cString + '"'
cStdOut := Space(1024)
cStdErr := Space(1024)
nResult := hb_processRun( cCommand, , @cStdOut, @cStdErr )
? cStdOut
//setcolor("n/w,n/w,n/w")
//qout(cStdOut)
function brcode_generator()
Local nPIX_AMOUNT := 1.00 // Valor do PIX
Local cPIX_KEY := "cleiton.leonel@gmail.com" // chave pix
Local cPIX_RECEIVER := "Cleiton Leonel Creton" // Nome do Proprietario do PIX
Local cPIX_CITY := "Cariacica" // Nome da Cidade do proprietario do PIX
Local cPIX_ZIPCODE := ""
Local cPIX_DESCRIPTION := "Doacao Livre / QRCODE - HARBOUR PIX"
Local cPIX_IDENTIFICATION := Nil
cString += get_value('00', '01')
cString += get_value('01', '11')
cString += get_account_information(cPIX_KEY, cPIX_DESCRIPTION)
cString += get_value('52', '0000')
cString += get_value('53', '986')
cString += get_value('54', alltrim(str(nPIX_AMOUNT)))
cString += get_value('58', 'BR')
cString += get_value('59', cPIX_RECEIVER)
cString += get_value('60', cPIX_CITY)
//cString += get_value('61', '')
cString += get_additional_data_field(cPIX_IDENTIFICATION)
cString += "6304"
cString += hb_numtohex(hb_crcct(cString, 0xFFFF, 0x11021))
//? cString
return cString
function get_value(identify, value)
return trim(identify + strzero(len(alltrim(value)), 2) + value)
function get_account_information(key, description)
Local base_pix := get_value('00', 'br.gov.bcb.pix')
Local info_string := ''
info_string += get_value('01', key)
info_string += get_value('02', description)
return get_value('26', base_pix + info_string)
function get_additional_data_field(identification)
if identification != Nil
return get_value('62', get_value('05', identification))
else
return get_value('62', get_value('05', '***'))
endif
return
METHOD DrawBarcodeQRCode( nX, nY, nLineWidth, cCode, nFlags )
LOCAL nLineHeight, hZebra
hZebra := hb_Zebra_Create_QRCode( cCode, nFlags )
nLineHeight := nLineWidth
IF hb_Zebra_GetError( hZebra ) == 0
hb_Zebra_Draw( hZebra, { | x, y, w, h | HPDF_Page_Rectangle( ::oPDFPage, x, y, w, h ) }, nX, nY, nLineWidth, -nLineHeight )
HPDF_Page_Fill( ::oPDFPage )
hb_Zebra_Destroy( hZebra )
ENDIF
RETURN NIL
https://github.com/JoseQuintas/libjpa/tree/master/bostaurus
hBitMap := HMG_CreateBarCode( QR_Txt,"QRCODE",3,100,.T.,QR_Tal,{0,0,0},{255,255,255},.F.,.F.,.F.)
Retornar para Contribuições, Dicas e Tutoriais
Usuários vendo este fórum: Google [Bot] e 21 visitantes