outra coisa ve se entendi corretamente
/
eslint-disable import/extensions /
import EfiPay from 'gn-api-sdk-typescript';
import options from '../../credentials';
const body = {
payment: {
banking_billet: {
expire_at: '2024-09-20',
customer: {
name: 'Gorbadoc Oldbuck',
email: '
[email protected]',
cpf: '94271564656',
birth: '1977-01-15',
phone_number: '5144916523',
},
},
},
items: [
{
name: 'Product 1',
value: 500,
amount: 1,
},
],
notification_url: '
http://your_domain.com/notification',
};
const efipay = new EfiPay(options);
efipay
.createOneStepCharge([], body)
.then((resposta: Promise) => {
console.log(resposta);
})
.catch((error: Promise) => {
console.log(error);
});
posso fazer dessa forma?