forked from smartwalle/alipay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bill_test.go
50 lines (43 loc) · 1016 Bytes
/
bill_test.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
package alipay_test
import (
"github.com/smartwalle/alipay/v3"
"testing"
)
func TestClient_BillDownloadURLQuery(t *testing.T) {
t.Log("========== BillDownloadURLQuery ==========")
var p = alipay.BillDownloadURLQuery{}
p.BillType = "trade"
p.BillDate = "2019-01-01"
rsp, err := client.BillDownloadURLQuery(p)
if err != nil {
t.Fatal(err)
}
if rsp.IsFailure() {
t.Fatal(rsp.Msg, rsp.SubMsg)
}
t.Logf("%v", rsp)
}
func TestClient_BillBalanceQuery(t *testing.T) {
t.Log("========== BillBalanceQuery ==========")
var p = alipay.BillBalanceQuery{}
rsp, err := client.BillBalanceQuery(p)
if err != nil {
t.Fatal(err)
}
if rsp.IsFailure() {
t.Fatal(rsp.Msg, rsp.SubMsg)
}
t.Logf("%v", rsp)
}
func TestClient_BillAccountLogQuery(t *testing.T) {
t.Log("========== BillAccountLogQuery ==========")
var p = alipay.BillAccountLogQuery{}
rsp, err := client.BillAccountLogQuery(p)
if err != nil {
t.Fatal(err)
}
if rsp.IsFailure() {
t.Fatal(rsp.Msg, rsp.SubMsg)
}
t.Logf("%v", rsp)
}