adp-sdk 0.0.1 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/pay/AdaPay.js +2 -0
- package/pay/Device.js +18 -0
- package/pay/index.js +3 -1
package/package.json
CHANGED
package/pay/AdaPay.js
CHANGED
@@ -15,6 +15,7 @@ var FastPay = require('./FastPay');
|
|
15
15
|
var FreezeAccount = require('./FreezeAccount');
|
16
16
|
var UnFreezeAccount = require('./UnFreezeAccount');
|
17
17
|
var Transfer = require('./Transfer');
|
18
|
+
var Device = require('./Device');
|
18
19
|
var Config = require('./Config');
|
19
20
|
var Utils = require('../adapay-core/Utils');
|
20
21
|
var Version = require('./Version');
|
@@ -100,6 +101,7 @@ module.exports = {
|
|
100
101
|
FreezeAccount,
|
101
102
|
UnFreezeAccount,
|
102
103
|
Transfer,
|
104
|
+
Device,
|
103
105
|
Config,
|
104
106
|
set_merchant_path,
|
105
107
|
set_group_merchant_path,
|
package/pay/Device.js
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
var Http = require('../adapay-core/Http');
|
2
|
+
var Logger = require('../adapay-core/Logger');
|
3
|
+
var Config = require('./Config');
|
4
|
+
function add(kwargs) {
|
5
|
+
return new Promise(function (resolve, reject) {
|
6
|
+
let url = Config.base_url + `/v1/payments/device/add`;
|
7
|
+
Http.post(url, kwargs, Config)
|
8
|
+
.then(function (result) {
|
9
|
+
Logger.info(result);
|
10
|
+
resolve(result);
|
11
|
+
})
|
12
|
+
.catch(function (error) {
|
13
|
+
Logger.error(error);
|
14
|
+
reject(error);
|
15
|
+
});
|
16
|
+
});
|
17
|
+
}
|
18
|
+
module.exports = { add };
|
package/pay/index.js
CHANGED
@@ -17,6 +17,7 @@ const Transfer = require('./Transfer');
|
|
17
17
|
const UnFreezeAccount = require('./UnFreezeAccount');
|
18
18
|
const Version = require('./Version');
|
19
19
|
const Wallet = require('./Wallet');
|
20
|
+
const Device = require('./Device');
|
20
21
|
|
21
22
|
module.exports = {
|
22
23
|
Account,
|
@@ -37,5 +38,6 @@ module.exports = {
|
|
37
38
|
Transfer,
|
38
39
|
UnFreezeAccount,
|
39
40
|
Version,
|
40
|
-
Wallet
|
41
|
+
Wallet,
|
42
|
+
Device
|
41
43
|
};
|