-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Exemplo do método ofReplaceRecurrencyPixParcel adicionado
- Loading branch information
1 parent
eda963c
commit a4ebccd
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
examples/open-finance/payments/recurrency/ofReplaceRecurrencyPixParcel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const EfiPay = require('sdk-node-apis-efi') | ||
const options = require('../../../credentials') | ||
|
||
const efipay = new EfiPay(options) | ||
|
||
let params = { | ||
identficadorPagamento: 'urn:efi:ae71713f-875b-4af3-9d85-0bcb43288847', | ||
} | ||
|
||
let body = { | ||
valor: "9.99" | ||
} | ||
|
||
|
||
// O método ofReplaceRecurrencyPixParcel indica os campos que devem ser enviados e que serão retornados | ||
efipay.ofReplaceRecurrencyPixParcel(params, body) | ||
.then((resposta) => { | ||
console.log(resposta) // Aqui você tera acesso a resposta da API e os campos retornados de forma intuitiva | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |