48 lines
1.7 KiB
Go
48 lines
1.7 KiB
Go
package dto
|
|
|
|
type WechatOAuthRequest struct {
|
|
Code string `json:"code" validate:"required" required:"true" description:"微信授权码"`
|
|
}
|
|
|
|
type WechatOAuthResponse struct {
|
|
AccessToken string `json:"access_token" description:"访问令牌"`
|
|
ExpiresIn int64 `json:"expires_in" description:"令牌有效期(秒)"`
|
|
Customer *PersonalCustomerResponse `json:"customer" description:"客户信息"`
|
|
}
|
|
|
|
type WechatPayJSAPIRequest struct {
|
|
OpenID string `json:"openid" validate:"required" required:"true" description:"用户OpenID"`
|
|
}
|
|
|
|
type WechatPayJSAPIResponse struct {
|
|
PrepayID string `json:"prepay_id" description:"预支付交易会话标识"`
|
|
PayConfig map[string]interface{} `json:"pay_config" description:"JSSDK支付配置"`
|
|
}
|
|
|
|
type WechatPayH5Request struct {
|
|
SceneInfo WechatH5SceneInfo `json:"scene_info" validate:"required" required:"true" description:"场景信息"`
|
|
}
|
|
|
|
type WechatH5SceneInfo struct {
|
|
PayerClientIP string `json:"payer_client_ip" validate:"required,ip" required:"true" description:"用户终端IP"`
|
|
H5Info WechatH5Detail `json:"h5_info" description:"H5场景信息"`
|
|
}
|
|
|
|
type WechatH5Detail struct {
|
|
Type string `json:"type" validate:"omitempty,oneof=iOS Android Wap" description:"场景类型 (iOS:苹果, Android:安卓, Wap:浏览器)"`
|
|
}
|
|
|
|
type WechatPayH5Response struct {
|
|
H5URL string `json:"h5_url" description:"微信支付跳转URL"`
|
|
}
|
|
|
|
type WechatPayJSAPIParams struct {
|
|
ID uint `path:"id" description:"订单ID" required:"true"`
|
|
WechatPayJSAPIRequest
|
|
}
|
|
|
|
type WechatPayH5Params struct {
|
|
ID uint `path:"id" description:"订单ID" required:"true"`
|
|
WechatPayH5Request
|
|
}
|