-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
44 lines (42 loc) · 843 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
require('dotenv').config();
const Payrexx = require('./lib/Payrexx');
const payrexx = new Payrexx(
process.env.INSTANCE,
process.env.APIKEY
)
payrexx.post('Gateway', {
amount: 100,
currency: 'CHF',
vatRate: 7.7,
purpose: 't()est',
psp: [
44,
36
],
pm: [
'visa',
'mastercard',
'twint',
'amex',
],
fields: {
email: {
value: '[email protected]'
},
forename: {
value: 'Max'
},
surname: {
value: 'Muster'
}
// add more field values here
}
// add more settings here
})
.then((result) => {
if (result.status !== 'success') {
console.error(result.message);
return;
}
console.log(result.data);
})