1.0.4 • Published 4 years ago

lib-manifest-sefaz v1.0.4

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

lib-manifest-sefaz

Simple way to communicate with SEFAZ REST web services

Install

$ npm install lib-manifest-sefaz

Usage

const manifestSefaz = require('lib-manifest-sefaz')

const cnpj = '00.000.000/0000-00'
const nsu = '000000000002774'
const chNFe = '33200304214716000142950016001908041118869319'
const cert = 'Bag Attributes localKeyID: 01 00 00 00 friendlyName:'
const key = 'Bag Attributes localKeyID: 01 00 00 00 friendlyName: PRIVATE'
const passphrase = 'passphrase'

const response = await manifestSefaz.manifestXml(cnpj, nsu, chNFe, cert, key, passphrase)

API

manifestXml(cnpj, nsu, chNFe, cert, key, passphrase)

cnpj

Type: string Length: 18

CNPJ of supplier company

NSU

Type: string Length: 15

Order number about NF on SEFAZ

chNFe

Type: string Length: 44

Key of NF

cert

Type: string

Certificate of supplier generate by SEFAZ

key

Type: string

Private certificate of supplier generate by SEFAZ

passphrase

Type: string

Passphrase of certificates

Libraries used in this project:

Command to extract certificate and private key:

$ openssl pkcs12 -in name_of_file.pfx -clcerts -nokeys -out cert.pem && openssl pkcs12 -in name_of_file.pfx -nocerts -out key.pem -nodes

License

Martini is distributed by The MIT License, see LICENSE

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago