87 lines
2.7 KiB
Go
87 lines
2.7 KiB
Go
package xyshanghai
|
|
|
|
// CommonRequestHeader 通用请求头
|
|
type CommonRequestHeader struct {
|
|
Timestamp string `json:"timestamp"`
|
|
Sign string `json:"sign"`
|
|
}
|
|
|
|
// CommonRequestBody 通用请求体
|
|
type CommonRequestBody struct {
|
|
EncryptedData string `json:"encryptedData"`
|
|
}
|
|
|
|
// CommonResponse 公共响应
|
|
type CommonResponse struct {
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data *string `json:"data,omitempty"` // SM4加密后的JSON字符串
|
|
}
|
|
|
|
// CreateOrderRequest 卡券/直充权益下单业务参数(加密前)
|
|
type CreateOrderRequest struct {
|
|
ActCode string `json:"actCode"`
|
|
GoodsCode string `json:"goodsCode"`
|
|
ActOrderNum string `json:"actOrderNum"`
|
|
Account string `json:"account,omitempty"`
|
|
CallbackURL string `json:"callbackUrl,omitempty"`
|
|
}
|
|
|
|
// CreateOrderResponse 下单响应业务数据(解密后)
|
|
type CreateOrderResponse struct {
|
|
OrderNo string `json:"orderNo"`
|
|
CouponNo string `json:"couponNo,omitempty"`
|
|
CouponCode string `json:"couponCode,omitempty"`
|
|
Status int `json:"status"`
|
|
ExpireTime string `json:"expireTime,omitempty"`
|
|
}
|
|
|
|
// QueryOrderRequest 订单查询业务参数(加密前)
|
|
type QueryOrderRequest struct {
|
|
ActCode string `json:"actCode"`
|
|
OrderNo string `json:"orderNo"`
|
|
}
|
|
|
|
// QueryOrderResponse 订单查询响应业务数据(解密后)
|
|
type QueryOrderResponse struct {
|
|
OrderNo string `json:"orderNo"`
|
|
Status int `json:"status"`
|
|
Account string `json:"account,omitempty"`
|
|
CardInfo *CardInfo `json:"cardInfo,omitempty"`
|
|
CouponID string `json:"couponId,omitempty"`
|
|
}
|
|
|
|
// CardInfo 卡券信息
|
|
type CardInfo struct {
|
|
CouponNo string `json:"couponNo"`
|
|
CouponCode string `json:"couponCode"`
|
|
ExpireTime string `json:"expireTime"`
|
|
}
|
|
|
|
// RechargeOrderRequest 微信立减金充值业务参数(加密前)
|
|
type RechargeOrderRequest struct {
|
|
ActCode string `json:"actCode"`
|
|
OrderNo string `json:"orderNo"`
|
|
GoodsCode string `json:"goodsCode"`
|
|
ActOrderNum string `json:"actOrderNum"`
|
|
AppID string `json:"appId"`
|
|
OpenID string `json:"openId"`
|
|
CallbackURL string `json:"callbackUrl,omitempty"`
|
|
}
|
|
|
|
// RechargeOrderResponse 充值响应业务数据(解密后)
|
|
type RechargeOrderResponse struct {
|
|
OrderNo string `json:"orderNo"`
|
|
Status int `json:"status"`
|
|
CouponID string `json:"couponId"`
|
|
}
|
|
|
|
// CallbackRequest 回调通知业务参数(加密前)
|
|
type CallbackRequest struct {
|
|
OrderNo string `json:"orderNo"`
|
|
ActOrderNum string `json:"actOrderNum"`
|
|
Status int `json:"status"`
|
|
Account string `json:"account,omitempty"`
|
|
CardInfo *CardInfo `json:"cardInfo,omitempty"`
|
|
CouponID string `json:"couponId,omitempty"`
|
|
} |