-
Notifications
You must be signed in to change notification settings - Fork 6
/
edu-papay.go
110 lines (101 loc) · 4.13 KB
/
edu-papay.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
package custom
type ReqEduPaPayPresign struct {
AppId string `json:"appid"`
SubMchId string `json:"sub_mchid"`
SubAppId string `json:"sub_appid"`
OpenId string `json:"openid"`
SubOpenId string `json:"sub_openid"`
PlanId string `json:"plan_id"`
UserId string `json:"user_id"`
PeriodStartDate string `json:"period_start_date"`
TradeScene string `json:"trade_scene"`
}
type RespEduPaPayPresign struct {
PresignToken string `json:"presign_token"`
}
type RespEduPaPayContractQueryList struct {
TotalCount int `json:"total_count"`
Offset int `json:"offset"`
Limit int `json:"limit"`
Data []RespEduPaPayContractQuery `json:"data"`
}
type RespEduPaPayContractQuery struct {
SpMchId string `json:"sp_mchid"`
AppId string `json:"appid"`
SubMchId string `json:"sub_mchid"`
SubAppId string `json:"sub_appid"`
OpenId string `json:"openid"`
SubOpenId string `json:"sub_openid"`
PlanId string `json:"plan_id"`
ContractInformation ContractInformation `json:"contract_information"`
}
type ContractInformation struct {
ContractId string `json:"contract_id"`
ContractStatus string `json:"contract_status"`
CreateTime string `json:"create_time"`
}
type ReqSendEduPaPayNotifications struct {
AppId string `json:"appid"`
SubMchId string `json:"sub_mchid"`
SubAppId string `json:"sub_appid"`
}
type ReqEduPaPayTransactions struct {
Appid string `json:"appid"`
SubMchId string `json:"sub_mchid"`
SubAppId string `json:"sub_appid"`
Body string `json:"body"`
Attach string `json:"attach"`
OutTradeNo string `json:"out_trade_no"`
GoodsTag string `json:"goods_tag"`
NotifyUrl string `json:"notify_url"`
ContractId string `json:"contract_id"`
TradeScene string `json:"trade_scene"`
Amount EduPaPayAmount `json:"amount"`
DeviceInformation EduPaPayDeviceInformation `json:"device_information"`
}
type EduPaPayAmount struct {
Total int64 `json:"total"`
Currency string `json:"currency"`
}
type EduPaPayDeviceInformation struct {
DeviceId string `json:"device_id"`
DeviceIp string `json:"device_ip"`
}
type RespEduPaPayQueryOrder struct {
SpMchId string `json:"sp_mchid"`
AppId string `json:"appid"`
SubMchId string `json:"sub_mchid"`
SubAppId string `json:"sub_appid"`
OutTradeNo string `json:"out_trade_no"`
TransactionId string `json:"transaction_id"`
Attach string `json:"attach"`
BankType string `json:"bank_type"`
SuccessTime string `json:"success_time"`
TradeState string `json:"trade_state"`
TradeStateDescription string `json:"trade_state_description"`
Payer struct {
OpenId string `json:"openid"`
SubOpenId string `json:"sub_openid"`
} `json:"payer"`
Amount struct {
Total int64 `json:"total"`
PayerTotal int64 `json:"payer_total"`
DiscountTotal int64 `json:"discount_total"`
Currency string `json:"currency"`
} `json:"amount"`
DeviceInformation struct {
DeviceId string `json:"device_id"`
DeviceIp string `json:"device_ip"`
} `json:"device_information"`
PromotionDetail []struct {
CouponId string `json:"coupon_id"`
Name string `json:"name"`
Scope string `json:"scope"`
Type string `json:"type"`
Amount int64 `json:"amount"`
StockId string `json:"stock_id"`
WechatpayContribute int64 `json:"wechatpay_contribute"`
MerchantContribute int64 `json:"merchant_contribute"`
OtherContribute int64 `json:"other_contribute"`
} `json:"promotion_detail"`
}