This repository has been archived by the owner on Sep 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Nefukční test #1
Comments
A tohle ti funguje? const eet = require('eet')
const fs = require('fs')
// privatni klic a certifikat podnikatele
const options = {
privateKey: fs.readFileSync('./node_modules/eet/test/keys/private.pem'),
certificate: fs.readFileSync('./node_modules/eet/test/keys/certificate.pem'),
playground: true
}
// polozky, ktere se posilaji do EET
const items = {
dicPopl: 'CZ1212121218',
idPokl: '/5546/RO24',
poradCis: '0/6460/ZQ42',
datTrzby: new Date(),
celkTrzba: 34113,
idProvoz: '273'
}
// ziskani FIK v Node.js 6+
eet(options, items).then(response => {
// response.fik
console.log(response)
}) Pokud ti tohle projde, tak je chyba v certifikátech. Zkontroluj, zda je privátní klíč i certifikát správný. |
Jinak testováno na Node.js v6.8.1 a Macu. |
tak už jsem našel tu příčinu, u těch klíčů se vygenerují při převodu z .p12 ještě tyto věci |
Aha, díky, doplním to tam při příštím releasu. |
Upravena dokumentace. |
Demo příklad mi nefunguje, nevypršela platnost klíče/cetifikátu? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Ahoj, díky za modul. Na tohle jsem čekal. Bohužel se mi to nedaří zprovoznit demo příklad.
Dostal jsem error:
(node:90107) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Neplatny podpis SOAP zpravy (4)
(node:90107) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The text was updated successfully, but these errors were encountered: