-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
89 lines (76 loc) · 1.39 KB
/
main.go
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package main
import (
"fmt"
"github.com/jamesnyakush/pesaswap/pesaswap/api"
"log"
)
const (
consumerKey = "dMMcTvqhxl"
appSecret = "wjqRX5tTSzFyJbwW33ANzwh9V"
)
func main() {
fmt.Println("Welcome to pesaswap")
svc, err := api.New(consumerKey, appSecret, api.SANDBOX)
if err != nil {
panic(err)
}
res, err := svc.NewUser(
"James",
"Nyakush",
"254746445198",
)
/*
res, err := svc.CardPayment(
"KES",
"10",
"012022",
"111",
"4242424242424242",
"AC312E60-BA4B-11EA-A700-4903572028c",
"AC312E60-BA4B-11EA-A700-4903572028FB",
)
*/
/*
res, err := svc.PaymentRequests(
"434334",
"Water Bill",
"1",
"10/07/2020",
"10/06/2020",
"AC312E60-BA4B-11EA-A700-4903572028FB",
"0746445198",
100,
)
*/
/*
res, err := svc.SendToMpesa(
"4242424242424242",
"254746445198",
"test",
"test",
"1",
"KES",
"Test",
"AC312E60-BA4B-11EA-A700-4903572028FB",
"AC312E60-BA4B-11EA-A700-4903572028FB",
)
*/
/* res, err := svc.CouponPayments(
"smN94",
"1",
"AC312E60-BA4B-11EA-A700-4903572028FB",
"AC312E60-BA4B-11EA-A700-4903572028FA",
)*/
//res, err := svc.QueryAll()
if err != nil {
log.Println(err)
}
log.Println(res)
}
/*
const (
consumerKey = "uLdedoqenx"
appSecret = "IWheLlsxP3ZuAZ1357z3A1zn8"
)
*/