-
Notifications
You must be signed in to change notification settings - Fork 2
/
std_trade_refund_callback_response.go
37 lines (33 loc) · 1.33 KB
/
std_trade_refund_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
package callback
import "encoding/json"
type StdTradeRefundCallbackResponse struct {
DisAccountAmount string `json:"disAccountAmount"`
ResidualAmount string `json:"residualAmount"`
OrderId string `json:"orderId"`
AccountDivided string `json:"accountDivided"`
BizSystemNo string `json:"bizSystemNo"`
Description string `json:"description"`
UniqueOrderNo string `json:"uniqueOrderNo"`
RefundRequestId string `json:"refundRequestId"`
RefundSuccessDate string `json:"refundSuccessDate"`
YeepayRefundPromotionDTOList string `json:"yeepayRefundPromotionDTOList"`
UniqueRefundNo string `json:"uniqueRefundNo"`
ParentMerchantNo string `json:"parentMerchantNo"`
RefundRequestDate string `json:"refundRequestDate"`
MerchantNo string `json:"merchantNo"`
RefundAmount string `json:"refundAmount"`
Status string `json:"status"`
}
func (resp StdTradeRefundCallbackResponse) IsSuccess() bool {
if "SUCCESS" == resp.Status {
return true
}
return false
}
func (resp StdTradeRefundCallbackResponse) ToJson() (string, error) {
bytes, err := json.Marshal(resp)
if err != nil {
return "", err
}
return string(bytes), nil
}