forked from go-pay/gopay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wechat_rsp.go
221 lines (211 loc) · 8.82 KB
/
wechat_rsp.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
//==================================
// * Name:Jerry
// * Tel:18017448610
// * DateTime:2019/1/13 14:03
//==================================
package gopay
type WeChatUnifiedOrderResponse struct {
ReturnCode string `xml:"return_code"`
ReturnMsg string `xml:"return_msg"`
Appid string `xml:"appid"`
MchId string `xml:"mch_id"`
DeviceInfo string `xml:"device_info"`
NonceStr string `xml:"nonce_str"`
Sign string `xml:"sign"`
ResultCode string `xml:"result_code"`
ErrCode string `xml:"err_code"`
ErrCodeDes string `xml:"err_code_des"`
TradeType string `xml:"trade_type"`
PrepayId string `xml:"prepay_id"`
CodeUrl string `xml:"code_url"`
MwebUrl string `xml:"mweb_url"`
}
type WeChatQueryOrderResponse struct {
ReturnCode string `xml:"return_code"`
ReturnMsg string `xml:"return_msg"`
Appid string `xml:"appid"`
MchId string `xml:"mch_id"`
NonceStr string `xml:"nonce_str"`
Sign string `xml:"sign"`
ResultCode string `xml:"result_code"`
ErrCode string `xml:"err_code"`
ErrCodeDes string `xml:"err_code_des"`
DeviceInfo string `xml:"device_info"`
Openid string `xml:"openid"`
IsSubscribe string `xml:"is_subscribe"`
TradeType string `xml:"trade_type"`
TradeState string `xml:"trade_state"`
BankType string `xml:"bank_type"`
TotalFee int `xml:"total_fee"`
SettlementTotalFee int `xml:"settlement_total_fee"`
FeeType string `xml:"fee_type"`
CashFee int `xml:"cash_fee"`
CashFeeType string `xml:"cash_fee_type"`
CouponFee int `xml:"coupon_fee"`
CouponCount int `xml:"coupon_count"`
CouponType0 string `xml:"coupon_type_0"`
CouponId0 string `xml:"coupon_id_0"`
CouponFee0 int `xml:"coupon_fee_0"`
TransactionId string `xml:"transaction_id"`
OutTradeNo string `xml:"out_trade_no"`
Attach string `xml:"attach"`
TimeEnd string `xml:"time_end"`
TradeStateDesc string `xml:"trade_state_desc"`
}
type WeChatCloseOrderResponse struct {
ReturnCode string `xml:"return_code"`
ReturnMsg string `xml:"return_msg"`
Appid string `xml:"appid"`
MchId string `xml:"mch_id"`
DeviceInfo string `xml:"device_info"`
NonceStr string `xml:"nonce_str"`
Sign string `xml:"sign"`
ResultCode string `xml:"result_code"`
ErrCode string `xml:"err_code"`
ErrCodeDes string `xml:"err_code_des"`
}
type WeChatReverseResponse struct {
ReturnCode string `xml:"return_code"`
ReturnMsg string `xml:"return_msg"`
Appid string `xml:"appid"`
MchId string `xml:"mch_id"`
NonceStr string `xml:"nonce_str"`
Sign string `xml:"sign"`
ResultCode string `xml:"result_code"`
ErrCode string `xml:"err_code"`
ErrCodeDes string `xml:"err_code_des"`
Recall string `xml:"recall"`
}
type WeChatRefundResponse struct {
ReturnCode string `xml:"return_code"`
ReturnMsg string `xml:"return_msg"`
ResultCode string `xml:"result_code"`
ErrCode string `xml:"err_code"`
ErrCodeDes string `xml:"err_code_des"`
Appid string `xml:"appid"`
MchId string `xml:"mch_id"`
NonceStr string `xml:"nonce_str"`
Sign string `xml:"sign"`
TransactionId string `xml:"transaction_id"`
OutTradeNo string `xml:"out_trade_no"`
OutRefundNo string `xml:"out_refund_no"`
RefundId string `xml:"refund_id"`
RefundFee int `xml:"refund_fee"`
SettlementRefundFee int `xml:"settlement_refund_fee"`
TotalFee int `xml:"total_fee"`
SettlementTotalFee int `xml:"settlement_total_fee"`
FeeType string `xml:"fee_type"`
CashFee int `xml:"cash_fee"`
CashFeeType string `xml:"cash_fee_type"`
CashRefundFee int `xml:"cash_refund_fee"`
CouponType0 string `xml:"coupon_type_0"`
CouponRefundFee int `xml:"coupon_refund_fee"`
CouponRefundFee0 int `xml:"coupon_refund_fee_0"`
CouponRefundCount int `xml:"coupon_refund_count"`
CouponRefundId0 string `xml:"coupon_refund_id_0"`
}
type WeChatQueryRefundResponse struct {
ReturnCode string `xml:"return_code"`
ReturnMsg string `xml:"return_msg"`
ResultCode string `xml:"result_code"`
ErrCode string `xml:"err_code"`
ErrCodeDes string `xml:"err_code_des"`
Appid string `xml:"appid"`
MchId string `xml:"mch_id"`
NonceStr string `xml:"nonce_str"`
Sign string `xml:"sign"`
TotalRefundCount int `xml:"total_refund_count"`
TransactionId string `xml:"transaction_id"`
OutTradeNo string `xml:"out_trade_no"`
TotalFee int `xml:"total_fee"`
SettlementTotalFee int `xml:"settlement_total_fee"`
FeeType string `xml:"fee_type"`
CashFee int `xml:"cash_fee"`
RefundCount int `xml:"refund_count"`
OutRefundNo0 string `xml:"out_refund_no_0"`
RefundId0 string `xml:"refund_id_0"`
RefundChannel0 string `xml:"refund_channel_0"`
RefundFee0 int `xml:"refund_fee_0"`
SettlementRefundFee0 int `xml:"settlement_refund_fee_0"`
CouponType00 string `xml:"coupon_type_0_0"`
CouponRefundFee0 int `xml:"coupon_refund_fee_0"`
CouponRefundCount0 int `xml:"coupon_refund_count_0"`
CouponRefundId00 string `xml:"coupon_refund_id_0_0"`
CouponRefundFee00 int `xml:"coupon_refund_fee_0_0"`
RefundStatus0 string `xml:"refund_status_0"`
RefundAccount0 string `xml:"refund_account_0"`
RefundRecvAccout0 string `xml:"refund_recv_accout_0"`
RefundSuccessTime0 string `xml:"refund_success_time_0"`
}
type WeChatMicropayResponse struct {
ReturnCode string `xml:"return_code"`
ReturnMsg string `xml:"return_msg"`
Appid string `xml:"appid"`
MchId string `xml:"mch_id"`
DeviceInfo string `xml:"device_info"`
NonceStr string `xml:"nonce_str"`
Sign string `xml:"sign"`
ResultCode string `xml:"result_code"`
ErrCode string `xml:"err_code"`
ErrCodeDes string `xml:"err_code_des"`
Openid string `xml:"openid"`
IsSubscribe string `xml:"is_subscribe"`
TradeType string `xml:"trade_type"`
BankType string `xml:"bank_type"`
FeeType string `xml:"fee_type"`
TotalFee int `xml:"total_fee"`
SettlementTotalFee int `xml:"settlement_total_fee"`
CouponFee int `xml:"coupon_fee"`
CashFeeType string `xml:"cash_fee_type"`
CashFee int `xml:"cash_fee"`
TransactionId string `xml:"transaction_id"`
OutTradeNo string `xml:"out_trade_no"`
Attach string `xml:"attach"`
TimeEnd string `xml:"time_end"`
PromotionDetail string `xml:"promotion_detail"`
}
type getSignKeyResponse struct {
ReturnCode string `xml:"return_code"`
ReturnMsg string `xml:"return_msg"`
Retmsg string `xml:"retmsg"`
Retcode string `xml:"retcode"`
MchId string `xml:"mch_id"`
SandboxSignkey string `xml:"sandbox_signkey"`
}
type WeChatNotifyRequest struct {
ReturnCode string `xml:"return_code"`
ReturnMsg string `xml:"return_msg"`
ResultCode string `xml:"result_code"`
ErrCode string `xml:"err_code"`
ErrCodeDes string `xml:"err_code_des"`
Appid string `xml:"appid"`
MchId string `xml:"mch_id"`
DeviceInfo string `xml:"device_info"`
NonceStr string `xml:"nonce_str"`
Sign string `xml:"sign"`
SignType string `xml:"sign_type"`
Openid string `xml:"openid"`
IsSubscribe string `xml:"is_subscribe"`
TradeType string `xml:"trade_type"`
BankType string `xml:"bank_type"`
TotalFee int `xml:"total_fee"`
SettlementTotalFee int `xml:"settlement_total_fee"`
FeeType string `xml:"fee_type"`
CashFee int `xml:"cash_fee"`
CashFeeType string `xml:"cash_fee_type"`
CouponFee int `xml:"coupon_fee"`
CouponCount int `xml:"coupon_count"`
CouponType0 string `xml:"coupon_type_0"`
CouponId0 string `xml:"coupon_id_0"`
CouponFee0 int `xml:"coupon_fee_0"`
TransactionId string `xml:"transaction_id"`
OutTradeNo string `xml:"out_trade_no"`
Attach string `xml:"attach"`
TimeEnd string `xml:"time_end"`
}
type WeChatUserIdRsp struct {
Openid string `json:"openid"` //用户唯一标识
SessionKey string `json:"session_key"` //会话密钥
Unionid string `json:"unionid"` //用户在开放平台的唯一标识符
ExpiresIn int `json:"expires_in"` //
}