log do servidor:
[nodemon] 1.19.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] starting `node index.js`
consign v0.1.2 Initialized in C:\Users\user\Desktop\proj\payfast
+ .\controllers\correios.js
+ .\controllers\pagamentos.js
+ .\controllers\uploads.js
+ .\persistencia\connectionFactory.js
+ .\persistencia\PagamentoDao.js
+ .\servicos\clienteCartoes.js
+ .\servicos\correiosSOAPClient.js
Servidor rodando na porta 3000.
processando uma requisicao de um novo pagamento
pagamento criado
undefined
(node:120) [DEP0126] DeprecationWarning: timers.active() is deprecated. Please use timeout.refresh() instead.
(node:120) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead.
C:\Users\user\Desktop\proj\payfast\node_modules\mysql\lib\protocol\Parser.js:78
throw err; // Rethrow non-MySQL errors
^
AssertionError [ERR_ASSERTION]: body
at Object.module.exports.<computed> [as ok] (C:\Users\user\Desktop\proj\payfast\node_modules\restify\node_modules\assert-plus\assert.js:242:35)
at JsonClient.write (C:\Users\user\Desktop\proj\payfast\node_modules\restify\lib\clients\json_client.js:33:12)
at JsonClient.post (C:\Users\user\Desktop\proj\payfast\node_modules\restify\lib\clients\string_client.js:45:18)
at CartoesClient.autoriza (C:\Users\user\Desktop\proj\payfast\servicos\clienteCartoes.js:10:17)
at Query._callback (C:\Users\user\Desktop\proj\payfast\controllers\pagamentos.js:88:24)
at Query.Sequence.end (C:\Users\user\Desktop\proj\payfast\node_modules\mysql\lib\protocol\sequences\Sequence.js:85:24)
at Query._handleFinalResultPacket (C:\Users\user\Desktop\proj\payfast\node_modules\mysql\lib\protocol\sequences\Query.js:144:8)
at Query.OkPacket (C:\Users\user\Desktop\proj\payfast\node_modules\mysql\lib\protocol\sequences\Query.js:78:10)
at Protocol._parsePacket (C:\Users\user\Desktop\proj\payfast\node_modules\mysql\lib\protocol\Protocol.js:280:23)
at Parser.write (C:\Users\user\Desktop\proj\payfast\node_modules\mysql\lib\protocol\Parser.js:74:12)
at Protocol.write (C:\Users\user\Desktop\proj\payfast\node_modules\mysql\lib\protocol\Protocol.js:39:16)
at Socket.<anonymous> (C:\Users\user\Desktop\proj\payfast\node_modules\mysql\lib\Connection.js:109:28)
at Socket.emit (events.js:209:13)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:286:11)
at Socket.Readable.push (_stream_readable.js:220:10) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
[nodemon] app crashed - waiting for file changes before starting...
JSON utilizado:
{
"pagamento": {
"forma_de_pagamento": "cartao",
"valor": 98.53,
"moeda": "USD",
"descricao": "criando um pagamento"
}
}
Estou utilizando o código do .zip da aula 3 e o pagamento consta corretamente no BD