mirror of
https://github.com/node-ebics/node-ebics-client.git
synced 2024-11-23 22:52:08 +00:00
fix(examples): orders ref
This commit is contained in:
parent
e060863356
commit
4b0bf0eba6
@ -6,9 +6,11 @@ const ebics = require('../index');
|
|||||||
const configjs = require('./config.js');
|
const configjs = require('./config.js');
|
||||||
|
|
||||||
const client = gClient;
|
const client = gClient;
|
||||||
|
const { Orders } = require('../index');
|
||||||
|
|
||||||
|
|
||||||
// New keys will be generated and saved in ./keys-test
|
// New keys will be generated and saved in ./keys-test
|
||||||
client.send(ebics.Orders.INI)
|
client.send(Orders.INI)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log('Response for INI order %j', resp);
|
console.log('Response for INI order %j', resp);
|
||||||
return client.send(ebics.Orders.HIA);
|
return client.send(ebics.Orders.HIA);
|
||||||
|
@ -3,10 +3,11 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const client = require('./getClient')();
|
const client = require('./getClient')();
|
||||||
|
const { Orders } = require('../index');
|
||||||
|
|
||||||
// Client keys must be already generated and send by letter.
|
// Client keys must be already generated and send by letter.
|
||||||
// The bank should have enabled the user
|
// The bank should have enabled the user
|
||||||
client.send(ebics.Orders.HPB)
|
client.send(Orders.HPB)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log('Response for HPB order %j', resp);
|
console.log('Response for HPB order %j', resp);
|
||||||
if (resp.technicalCode !== '000000')
|
if (resp.technicalCode !== '000000')
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const client = require('./getClient')();
|
const client = require('./getClient')();
|
||||||
|
const { Orders } = require('../index');
|
||||||
|
|
||||||
// The bank keys must have been already saved
|
// The bank keys must have been already saved
|
||||||
client.send(ebics.Orders.C52(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
client.send(Orders.C52(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log('Response for C52 order %j', resp);
|
console.log('Response for C52 order %j', resp);
|
||||||
if (resp.technicalCode !== '000000')
|
if (resp.technicalCode !== '000000')
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const client = require('./getClient')();
|
const client = require('./getClient')();
|
||||||
|
const { Orders } = require('../index');
|
||||||
|
|
||||||
// The bank keys must have been already saved
|
// The bank keys must have been already saved
|
||||||
client.send(ebics.Orders.C53(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
client.send(Orders.C53(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log('Response for C53 order %j', resp);
|
console.log('Response for C53 order %j', resp);
|
||||||
if (resp.technicalCode !== '000000')
|
if (resp.technicalCode !== '000000')
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const client = require('./getClient')();
|
const client = require('./getClient')();
|
||||||
|
const { Orders } = require('../index');
|
||||||
|
|
||||||
// The bank keys must have been already saved
|
// The bank keys must have been already saved
|
||||||
client.send(ebics.Orders.DKI(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
client.send(Orders.DKI(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log('Response for DKI order %j', resp);
|
console.log('Response for DKI order %j', resp);
|
||||||
if (resp.technicalCode !== '000000')
|
if (resp.technicalCode !== '000000')
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const client = require('./getClient')();
|
const client = require('./getClient')();
|
||||||
|
const { Orders } = require('../index');
|
||||||
|
|
||||||
// The bank keys must have been already saved
|
// The bank keys must have been already saved
|
||||||
client.send(ebics.Orders.HKD)
|
client.send(Orders.HKD)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log('Response for HKD order %j', resp);
|
console.log('Response for HKD order %j', resp);
|
||||||
if (resp.technicalCode !== '000000')
|
if (resp.technicalCode !== '000000')
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const client = require('./getClient')();
|
const client = require('./getClient')();
|
||||||
|
const { Orders } = require('../index');
|
||||||
|
|
||||||
// The bank keys must have been already saved
|
// The bank keys must have been already saved
|
||||||
client.send(ebics.Orders.HTD)
|
client.send(Orders.HTD)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log('Response for HTD order %j', resp);
|
console.log('Response for HTD order %j', resp);
|
||||||
if (resp.technicalCode !== '000000')
|
if (resp.technicalCode !== '000000')
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const client = require('./getClient')();
|
const client = require('./getClient')();
|
||||||
|
const { Orders } = require('../index');
|
||||||
|
|
||||||
// The bank keys must have been already saved
|
// The bank keys must have been already saved
|
||||||
client.send(ebics.Orders.STA(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
client.send(Orders.STA(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log('Response for STA order %j', resp);
|
console.log('Response for STA order %j', resp);
|
||||||
if (resp.technicalCode !== '000000')
|
if (resp.technicalCode !== '000000')
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const client = require('./getClient')();
|
const client = require('./getClient')();
|
||||||
|
const { Orders } = require('../index');
|
||||||
|
|
||||||
|
|
||||||
// The bank keys must have been already saved
|
// The bank keys must have been already saved
|
||||||
client.send(ebics.Orders.VMK(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
client.send(Orders.VMK(null, null)) // startDate 'YYYY-MM-DD', endDate 'YYYY-MM-DD'
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log('Response for VMK order %j', resp);
|
console.log('Response for VMK order %j', resp);
|
||||||
if (resp.technicalCode !== '000000')
|
if (resp.technicalCode !== '000000')
|
||||||
|
@ -6,11 +6,12 @@ const ebics = require('../index');
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
const client = require('./getClient')();
|
const client = require('./getClient')();
|
||||||
|
const { Orders } = require('../index');
|
||||||
|
|
||||||
// The bank keys must have been already saved
|
// The bank keys must have been already saved
|
||||||
const paymentFile = fs.readFileSync('mytestfile.xml').toString();
|
const paymentFile = fs.readFileSync('mytestfile.xml').toString();
|
||||||
|
|
||||||
client.send(ebics.Orders.XG1(paymentFile))
|
client.send(Orders.XG1(paymentFile))
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
console.log('Response for XG1 order %j', resp);
|
console.log('Response for XG1 order %j', resp);
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user