Expand description
Functions for attaching SEFAZ authorization protocols to signed XML documents. Functions for attaching SEFAZ authorization protocols to signed XML documents.
Each submodule handles one type of protocol attachment:
- [
protocol] — NFe authorization (<nfeProc>) - [
inutilizacao] — Number voiding (<ProcInutNFe>) - [
event] — Event protocol (<procEventoNFe>) - [
b2b] — B2B financial wrapper (<nfeProcB2B>) - [
cancellation] — Cancellation event attachment - [
helpers] — Internal XML parsing utilities
Functions§
- attach_
b2b - Attach a B2B financial tag to an authorized
<nfeProc>XML, wrapping both in a<nfeProcB2B>element. - attach_
cancellation - Attach a cancellation event response to an authorized
<nfeProc>XML, marking the NF-e as locally cancelled. - attach_
event_ protocol - Attach an event protocol response to the event request,
producing the
<procEventoNFe>wrapper. - attach_
inutilizacao - Attach the SEFAZ inutilizacao response to the request,
producing the
<ProcInutNFe>wrapper. - attach_
protocol - Attach the SEFAZ authorization protocol to a signed NFe XML,
producing the
<nfeProc>wrapper required for storage and DANFE. - to_
authorize - Detect the document type from raw XML and dispatch to the correct protocol-attachment function.