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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package models
type PayMealList struct {
ID int `json:"id" description:"套餐id"`
Money float64 `json:"money" description:"金额"`
Year int `json:"year" description:"套餐时间 年"`
Month int `json:"month" description:"套餐时间 月"`
Day int `json:"day" description:"套餐时间 天"`
MealType uint `json:"meal_type" description:"0 付费套餐 1 试用套餐"`
Description string `json:"description" description:"套餐说明"`
Discount float64 `json:"off" description:"折扣"`
}
type OpenState struct {
State uint `json:"state" description:"0: 未开通 1: 试用开通 2: 付费开通"`
ExpireTime string `json:"expire_time,omitempty" description:"到期时间"`
IsExpire uint `json:"is_expire" description:"是否过期 0: 未过期 1: 过期"`
AboutToExpire uint `json:"about_to_expire" description:"是否即将过期 0: 是 1: 不是"`
}
type BillState struct {
State uint `json:"state" description:"0: 未支付 1: 支付成功"`
}
type DoctorPurchase struct {
MealID int `json:"meal_id" description:"套餐id"`
Platform uint `json:"platform" description:"1:小程序 2:客户端"`
OpenId string `json:"open_id" description:"open id"`
}
type ClientDoctorPurchase struct {
MealID int `json:"meal_id" description:"套餐id"`
PayType uint `json:"pay_type" description:"1:微信 2:支付宝"`
}
type ClientDoctorPurchaseResponse struct {
OutTradeNo string `json:"out_trade_no" description:"订单号"`
QrCodeURL string `json:"qr_code_url,omitempty" description:"微信Native支付 或 支付宝扫码支付 二维码url"`
}
type PurchaseDoctor struct {
// 附加信息
AttachInfo string `json:"attach_info"`
// 商品描述 名称之类的
GoodsDes string `json:"goods_des"`
// 商品详情
GoodsDetail string `json:"goods_detail"`
// 商品金额
GoodsPrice float64 `json:"goods_price"`
OpenID string `json:"open_id" description:"此参数 支付类型是 JS API 的时候 必传"`
// 回调地址 可为空
NoticeURL string `json:"notice_url" description:"客户端回调的url"`
// 支付类型 1 微信 2 支付宝 3 拉卡拉
PayType int `json:"pay_type"`
SourceCode uint8 `json:"source_code" description:"1: 微信 Native 2:微信小程序 3:微信内支付 4:h5 跳微信 5:支付宝(web)-扫码或登录支付宝账户 6:alipay(mobile) 7:alipay(app)"`
// 平台信息
PlatformType uint8 `json:"platform_type" description:"平台类型 '1: saas 2: shop"`
PlatformInfo string `json:"platform_info" description:"平台信息 saas或商城传递过来的信息"`
AppID string `json:"app_id,omitempty" description:"wxAppId"`
IsServe uint `json:"is_serve" description:"连接模式 0:直连 1:服务商模式"`
SubMchid string `json:"sub_mchid" description:"商户账号"`
}
type UnifiedOrderResponse struct {
TradeType uint8 `json:"trade_type" description:"支付类型"`
OutTradeNo string `json:"out_trade_no" description:"订单号"`
QrCodeURL string `json:"qr_code_url,omitempty" description:"微信Native支付 或 支付宝扫码支付 二维码url"`
PrePayID string `json:"pre_pay_id,omitempty" description:"预支付交易会话标识"`
MWebURL string `json:"m_web_url,omitempty" description:"h5支付时 返回的URL"`
AppID string `json:"app_id,omitempty" description:"js api AppId"`
TimeStamp string `json:"timeStamp,omitempty" description:"js api 时间戳"`
NonceStr string `json:"nonce_str,omitempty" description:"js api 随机字符串"`
Package string `json:"package,omitempty" description:"js api 订单详情扩展字符串"`
SignType string `json:"sign_type,omitempty" description:"js api 支付 签名类型"`
PaySign string `json:"pay_sign,omitempty" description:"js api 支付 签名"`
}
type PayRes struct {
Code int `json:"code"`
Message string `json:"message"`
Data UnifiedOrderResponse `json:"data"`
}
// 支付系统传过来的
type NoticeRequest struct {
OutTradeNo string `json:"out_trade_no"` // 订单号
ReturnMsg string `json:"return_msg"` // 是否成功
AttachInfo string `json:"attach_info"` // 附加信息
}
// 返回给支付系统
type NoticeResponse struct {
Code int
Message string
Data interface{}
}
type BDoctorBill struct {
ID int `json:"id"`
ChainID int `json:"chain_id"`
HospitalID int `json:"hospital_id"`
ResultCode int `json:"result_code"`
Year int `json:"year"`
Month int `json:"month"`
Day int `json:"day"`
}
type SysPayResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data"`
}