2019-11-29 13:30:32 +00:00
|
|
|
#! /usr/bin/env node
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const ebics = require('../index');
|
|
|
|
const fs = require('fs');
|
|
|
|
|
2019-12-18 14:48:05 +00:00
|
|
|
const client = require('./getClient')();
|
2019-12-30 09:36:11 +00:00
|
|
|
const { Orders } = require('../index');
|
2019-11-29 13:30:32 +00:00
|
|
|
|
|
|
|
// The bank keys must have been already saved
|
|
|
|
const paymentFile = fs.readFileSync('mytestfile.xml').toString();
|
|
|
|
|
2019-12-30 09:36:11 +00:00
|
|
|
client.send(Orders.XG1(paymentFile))
|
2019-11-29 13:30:32 +00:00
|
|
|
.then((resp) => {
|
|
|
|
console.log('Response for XG1 order %j', resp);
|
|
|
|
})
|
|
|
|
.catch((err) => {
|
|
|
|
console.error(err);
|
|
|
|
process.exit(1);
|
|
|
|
});
|