-
Notifications
You must be signed in to change notification settings - Fork 2
/
std_trade_order_callback_response.go
43 lines (39 loc) · 1.51 KB
/
std_trade_order_callback_response.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
package callback
import "encoding/json"
type StdTradeOrderCallbackResponse struct {
BankTrxId string `json:"bankTrxId"`
PreAuthAccountTime string `json:"preAuthAccountTime"`
OrderId string `json:"orderId"`
BankOrderId string `json:"bankOrderId"`
OpenId string `json:"openID"`
PaySuccessDate string `json:"paySuccessDate"`
CustomerFee string `json:"customerFee"`
PlatformType string `json:"platformType"`
CardType string `json:"cardType"`
BankPaySuccessDate string `json:"bankPaySuccessDate"`
UniqueOrderNo string `json:"uniqueOrderNo"`
YpSettleAmount string `json:"ypSettleAmount"`
FundProcessType string `json:"fundProcessType"`
BankId string `json:"bankId"`
OrderAmount string `json:"orderAmount"`
PayAmount string `json:"payAmount"`
RequestDate string `json:"requestDate"`
ParentMerchantNo string `json:"parentMerchantNo"`
YeepayPromotionDTOList string `json:"yeepayPromotionDTOList"`
PaymentProduct string `json:"paymentProduct"`
MerchantNo string `json:"merchantNo"`
Status string `json:"status"`
}
func (resp StdTradeOrderCallbackResponse) IsSuccess() bool {
if "SUCCESS" == resp.Status {
return true
}
return false
}
func (resp StdTradeOrderCallbackResponse) ToJson() (string, error) {
bytes, err := json.Marshal(resp)
if err != nil {
return "", err
}
return string(bytes), nil
}