-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcash.js
More file actions
41 lines (38 loc) · 768 Bytes
/
cash.js
File metadata and controls
41 lines (38 loc) · 768 Bytes
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
let cash = require('@nurigo/cash-lib')
// deductCash ex)
let payload = {
'member_srl': '214727', // 필수
'cash': 0, // 충전/차감 캐쉬
'point': 0, // 충전/차감 캐쉬
'type': 'init' // 'recharge', 'deduct', 'init' 중 하나
}
cash.deductCash(payload).then((res) => {
console.log("SUCCESS")
console.log(res)
})
.catch((err) => {
console.log("ERROR")
console.log(err)
})
/*
// deductCashByType ex)
payload = {
'member_srl': '214727', // 필수
'messages': {
'sms': 1,
'lms': 0,
'mms': 0,
'ata': 0,
'cta': 0,
'push': 0
},
'app_id': 'app_id',
'sync': 'true' // 'true'면 maindb와 sync 안함
}
cash.deductCashByType(payload).then((res) => {
console.log(res)
})
.catch((err) => {
console.log(err)
})
*/