Skip to content

Commit 3651abc

Browse files
committed
add settlement example
1 parent 1897780 commit 3651abc

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

examples/settlements.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
'use strict'
2+
3+
const CloudIpsp = require('../lib')
4+
5+
const fondy = new CloudIpsp(
6+
{
7+
merchantId: 700001,
8+
secretKey: 'test',
9+
protocol: '2.0'
10+
}
11+
)
12+
13+
const receivers = [{
14+
requisites: {
15+
amount: 500,
16+
merchant_id: 600001
17+
},
18+
type: 'merchant'
19+
},
20+
{
21+
requisites: {
22+
amount: 500,
23+
merchant_id: 700001
24+
},
25+
type: 'merchant'
26+
}
27+
28+
]
29+
const data = {
30+
order_id: 'Your Order Id',
31+
order_desc: 'test order',
32+
currency: 'USD',
33+
amount: '1000',
34+
receiver: receivers
35+
}
36+
console.log(data)
37+
fondy.Checkout(data).then(data => {
38+
console.log(data)
39+
}).catch((error) => {
40+
console.log(error)
41+
})

0 commit comments

Comments
 (0)