-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest.go
63 lines (56 loc) · 1.68 KB
/
request.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
package ynrcc
const (
ServiceCloseOrder = "CloseOrder"
ServiceQueryTrxState = "QueryTrxState"
ServiceMPCreateTrade = "MPCreateTrade"
ServicePayResultMerNotify = "PayResultMerNotify"
)
type request struct {
Request any `json:"request"`
}
type RequestCommon struct {
Service string `json:"service"`
TranCode string `json:"tranCode,omitempty"`
SeqNo string `json:"seqNo"`
TxnTime string `json:"txnTime"`
MerID string `json:"merId"`
TemID string `json:"temId"`
}
type CloseOrderRequest struct {
RequestCommon
TradeNo string `json:"tradeNo"`
OriginTradeNo string `json:"originTradeNo"`
OrderID string `json:"orderId"`
NotifyURL string `json:"notifyUrl"`
}
type QueryTrxStateRequest struct {
RequestCommon
TradeNo string `json:"tradeNo"`
}
type MPCreateTradeRequest struct {
RequestCommon
TradeNo string `json:"tradeNo"`
TradeChannel string `json:"tradeChannel"`
BusinessType string `json:"businessType"`
TotalAmt string `json:"totalAmt"`
TotalNum string `json:"totalNum"`
OrderDesc string `json:"orderDesc"`
OnlineFlag string `json:"onlineFlag"`
EventFlag string `json:"eventFlag"`
Ccy string `json:"ccy"`
SubOpenID string `json:"subOpenId"`
SubAppID string `json:"subAppId"`
NotifyURL string `json:"notifyUrl"`
}
type PayResultMerNotifyRequest struct {
RequestCommon
Code string `json:"code"`
Msg string `json:"msg"`
TradeNo string `json:"tradeNo"`
State string `json:"state"`
OrderID string `json:"orderId"`
TradeTime string `json:"tradeTime"`
TotalAmt string `json:"totalAmt"`
PaidAmt string `json:"paidAmt"`
DiscountAmt int `json:"discountAmt"`
}