2024-06-13 18:45:49 +08:00
|
|
|
package front
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
)
|
|
|
|
|
|
|
|
type XinYeOrderRequest struct {
|
|
|
|
SAppId string `json:"sAppId"`
|
|
|
|
TxnType string `json:"txnType"`
|
|
|
|
ProdId string `json:"prodId"`
|
|
|
|
AccessType string `json:"accessType"`
|
|
|
|
MchtId string `json:"mchtId"`
|
|
|
|
MchtUserId string `json:"mchtUserId"`
|
|
|
|
MchtOrderId string `json:"mchtOrderId"`
|
|
|
|
MchtOrderDateTime string `json:"mchtOrderDateTime"`
|
|
|
|
MchtOrderAmt string `json:"mchtOrderAmt"`
|
|
|
|
MchtTxnAmt string `json:"mchtTxnAmt"`
|
|
|
|
MainPayType string `json:"mainPayType"`
|
|
|
|
CcyType string `json:"ccyType"`
|
|
|
|
BuRealFlag string `json:"buRealFlag"`
|
|
|
|
FrontEndUrl string `json:"frontEndUrl"`
|
|
|
|
OrderRemark string `json:"orderRemark"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type XinYeOrderResponse struct {
|
|
|
|
Code string `json:"code"`
|
|
|
|
Msg string `json:"msg"`
|
|
|
|
RccsSuccess string `json:"rccsSuccess"`
|
|
|
|
PayInfo payInfo `json:"payInfo"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type XinYeOrderQueryResponse struct {
|
|
|
|
Code string `json:"code"`
|
|
|
|
Msg string `json:"msg"`
|
|
|
|
RccsSuccess string `json:"rccsSuccess"`
|
|
|
|
OrderInfo OrderInfo `json:"orderInfo"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type OrderInfo struct {
|
|
|
|
TxnStatus string `json:"txnStatus"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type payInfo struct {
|
|
|
|
PayToken string `json:"payToken"`
|
|
|
|
PayTokenTime string `json:"payTokenTime"`
|
|
|
|
TxnOrderId string `json:"txnOrderId"`
|
|
|
|
TxnOrderTime string `json:"txnOrderTime"`
|
|
|
|
MchtOrderId string `json:"mchtOrderId"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type XinYeOrderQueryRequest struct {
|
|
|
|
SAppId string `json:"sAppId"`
|
|
|
|
TxnType string `json:"txnType"`
|
|
|
|
ProdId string `json:"prodId"`
|
|
|
|
AccessType string `json:"accessType"`
|
|
|
|
MchtId string `json:"mchtId"`
|
|
|
|
OriMchtOrderId string `json:"oriMchtOrderId"`
|
|
|
|
}
|
|
|
|
|
2024-07-08 18:01:02 +08:00
|
|
|
func (this *XinYeOrderRequest) ToMap() (resultMap map[string]string) {
|
2024-06-13 18:45:49 +08:00
|
|
|
// Marshal the struct to JSON, ignoring omitempty fields.
|
|
|
|
jsonBytes, err := json.Marshal(this)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// Unmarshal the JSON into a map to get the final result.
|
|
|
|
err = json.Unmarshal(jsonBytes, &resultMap)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
return resultMap
|
|
|
|
}
|