@jessica_efi Crie um arquivo teste.js:
const EfiPay = require('sdk-node-apis-efi')
const efiOptions = require('./src/config/efi-config');
const efipay = new EfiPay(efiOptions)
let chargeInput = {
items: [
{
name: 'Product A',
value: 1000,
amount: 2,
},
],
}
efipay.createCharge({}, chargeInput)
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error)
})
Mas quando rodei com as mesmas credenciais, deu esse erro:
$ node teste.js
node:internal/validators:162
throw new ERR_INVALID_ARG_TYPE(name, 'st
ring', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "paths
[1]" argument must be of type string. Receiv
ed undefined
Na doc não achei quais são os campos obrigatórios... apenas esse trecho de código