-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathpartnet-pg.js
53 lines (41 loc) · 1.34 KB
/
partnet-pg.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
45
46
47
48
49
50
51
52
const bitbnsApi = require('./index');
const bitbns = new bitbnsApi({
apiKey : 'your_public_key',
apiSecretKey : 'your_private_key'
});
// To register a new identity with Bitbns system
// Can add upto 3 names for user as per in different sending banks
// Mandatory fields - name1 and identifier
bitbns.registerClientIdentity({
name1 : 'Test User',
name2 : 'T User',
name3 : 'Test U',
identifier : 'HDUIEHIEJOIDEJDEOIOERNDKR' // max 45 characters
},function(error, data) {
console.log(data);
});
// To add bank details of an identity with Bitbns system
// Mandatory fields - all of them
bitbns.addClientBankDetails({
account_no : '64872364928349838',
ifsc : 'HDFC0000017',
identifier : 'HDUIEHIEJOIDEJDEOIOERNDKR' // max 45 characters
},function(error, data) {
console.log(data);
});
// To remove bank details of an identity with Bitbns system
// Mandatory fields - all of them
bitbns.removeClientBankDetails({
account_no : '64872364928349838',
ifsc : 'HDFC0000017',
identifier : 'HDUIEHIEJOIDEJDEOIOERNDKR' // max 45 characters
},function(error, data) {
console.log(data);
});
// To fetch all submitted details of an identity with Bitbns system
// Mandatory fields - identifier
bitbns.fetchAllClientDetails({
identifier : 'HDUIEHIEJOIDEJDEOIOERNDKR' // max 45 characters
},function(error, data) {
console.log(data);
});