-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.js
51 lines (39 loc) · 1.22 KB
/
example.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
var checkRequestData = {
"first_name": "Ramyatha",
"last_name": "Yugendernath",
"amount": 20,
"recipient": "[email protected]"
};
var invoiceRequestData = {
"first_name": "Ramyatha",
"last_name": "Yugendernath",
"amount": 20,
"email": "[email protected]",
"description": "Pay for work"
}
var key = process.env.CHECKBOOK_KEY;
var secret = process.env.CHECKBOOK_SECRET;
var checkbook = require('./lib/checkbook')(key, secret);
// checkbook.check.sendDigital(checkRequestData, function(err, response){
// console.log(response);
// });
checkbook.check.getById('5add272bb5bb4baba7460e7b5fe0d033', function(err, res){
console.log(err);
console.log(res);
});
// checkbook.check.cancel('5add272bb5bb4baba7460e7b5fe0d033', function(err, res){
// console.log(res);
// });
// checkbook.invoice.get(function(err, res){
// console.log(res);
// });
// checkbook.invoice.create(invoiceRequestData, function(err, res){
// console.log(res);
// });
// // 8d9b1ca3825f4b60bf987304f618a021
// checkbook.invoice.getById('8d9b1ca3825f4b60bf987304f618a021', function(err, res){
// console.log(res);
// });
// checkbook.invoice.cancel('8d9b1ca3825f4b60bf987304f618a021', function(err, res){
// console.log(res);
// });