/* eslint-disable import/extensions */ import EfiPay from 'gn-api-sdk-typescript'; import options from '../../credentials'; const body = { items: [ { name: 'Product 1', value: 1000, amount: 2, }, ], shippings: [ { name: 'Default Shipping Cost', value: 100, }, ], }; const efipay = new EfiPay(options); efipay .createCharge({}, body) .then((resposta: Promise) => { console.log(resposta); }) .catch((error: Promise) => { console.log(error); });