Skip to content

Commit

Permalink
Exemplos atualizados
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoliveiraGN committed Jul 26, 2021
1 parent 7820920 commit 910d89e
Show file tree
Hide file tree
Showing 39 changed files with 266 additions and 133 deletions.
42 changes: 13 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,9 @@ module.exports = {
// PRODUÇÃO = false
// HOMOLOGAÇÃO = true
sandbox: false,

// CREDENCIAIS DE PRODUÇÃO
clientIdProducao: '',
clientSecretProducao: '',
pathCertProducao: '',

// CREDENCIAIS DE HOMOLOGAÇÃO
clientIdHomologacao: '',
clientSecretHomologacao: '',
pathCertHomologacao: '',

// VALIDAR MTLS?
validateMtls: false,
client_id: 'seuClientId',
client_secret: 'seuClientSecret',
pix_cert: 'caminhoAteOCertificadoPix',
};
```

Expand All @@ -69,9 +59,13 @@ var chargeInput = {

gerencianet
.createCharge({}, chargeInput)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
```

## Exemplos
Expand All @@ -91,19 +85,9 @@ module.exports = {
// PRODUÇÃO = false
// HOMOLOGAÇÃO = true
sandbox: false,

// CREDENCIAIS DE PRODUÇÃO
clientIdProducao: '',
clientSecretProducao: '',
pathCertProducao: '',

// CREDENCIAIS DE HOMOLOGAÇÃO
clientIdHomologacao: '',
clientSecretHomologacao: '',
pathCertHomologacao: '',

// VALIDAR MTLS?
validateMtls: false,
client_id: 'seuClientId',
client_secret: 'seuClientSecret',
pix_cert: 'caminhoAteOCertificadoPix',
};
```

Expand Down
10 changes: 7 additions & 3 deletions examples/default/carnet/cancelCarnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.cancelCarnet(params)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/carnet/cancelParcel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.cancelParcel(params)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/carnet/createCarnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.createCarnet({}, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/carnet/createCarnetHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.createCarnetHistory(params, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
8 changes: 6 additions & 2 deletions examples/default/carnet/detailCarnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.detailCarnet(params)
.then(console.log)
.catch(console.log)
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/carnet/resendCarnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.resendCarnet(params, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/carnet/resendParcel.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.resendParcel(params, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/carnet/settleCarnetParcel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.settleCarnetParcel(params)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/carnet/updateCarnetMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.updateCarnetMetadata(params, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/carnet/updateParcel.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.updateParcel(params, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
8 changes: 6 additions & 2 deletions examples/default/charge/cancelCharge.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.cancelCharge(params)
.then(console.log)
.catch(console.log)
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/charge/chargeLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.chargeLink(params, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/charge/createBilletPayment.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.payCharge(params, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/charge/createCardPayment.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.payCharge(params, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/charge/createCharge.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.createCharge({}, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/charge/createChargeBalanceSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.createChargeBalanceSheet(params, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/charge/createChargeHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.createChargeHistory(params, body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
8 changes: 6 additions & 2 deletions examples/default/charge/createChargeOneStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.oneStep([], body)
.then(console.log)
.catch(console.log)
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/charge/createChargeOneStepBilletMarketPlace.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.oneStep([], body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/charge/createChargeOneStepCardMarketPlace.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.oneStep([], body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
10 changes: 7 additions & 3 deletions examples/default/charge/createChargeOneStepCreditCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.oneStep([], body)
.then(console.log)
.catch(console.log)
.done();
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
8 changes: 6 additions & 2 deletions examples/default/charge/detailCharge.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ var gerencianet = new Gerencianet(options);

gerencianet
.detailCharge(params)
.then(console.log)
.catch(console.log)
.then((resposta) => {
console.log(resposta)
})
.catch((error) => {
console.log(error);
})
.done();
Loading

0 comments on commit 910d89e

Please sign in to comment.