-
Notifications
You must be signed in to change notification settings - Fork 166
/
base.go
58 lines (50 loc) · 1.21 KB
/
base.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
package request
type Prepay interface {
SetNotifyUrl(url string)
SetSpMchId(id string)
SetSubMchId(id string)
SetSpAppId(id string)
SetSubAppId(id string)
GetNotifyUrl() string
GetSpAppId() string
GetSubAppId() string
GetSpMchId() string
GetSubMchId() string
}
type PrepayBase struct {
SpMchId string `json:"sp_mchid"`
SubMchId string `json:"sub_mchid"`
SpAppId string `json:"sp_appid"`
SubAppId string `json:"sub_appid"`
NotifyUrl string `json:"notify_url"`
}
func (prepay *PrepayBase) SetNotifyUrl(url string) {
prepay.NotifyUrl = url
}
func (prepay *PrepayBase) GetNotifyUrl() string {
return prepay.NotifyUrl
}
func (prepay *PrepayBase) SetSpMchId(id string) {
prepay.SpMchId = id
}
func (prepay *PrepayBase) SetSubMchId(id string) {
prepay.SubMchId = id
}
func (prepay *PrepayBase) SetSpAppId(id string) {
prepay.SpAppId = id
}
func (prepay *PrepayBase) SetSubAppId(id string) {
prepay.SubAppId = id
}
func (prepay *PrepayBase) GetSpAppId() string {
return prepay.SpAppId
}
func (prepay *PrepayBase) GetSubAppId() string {
return prepay.SubAppId
}
func (prepay *PrepayBase) GetSpMchId() string {
return prepay.SpMchId
}
func (prepay *PrepayBase) GetSubMchId() string {
return prepay.SubMchId
}