Initial commit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-23 11:07:42 +08:00
co-authored by Claude Opus 5.5
commit 7974a42301
633 changed files with 120248 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
package pubdef
import "videoweb/pub/common/maths"
// VipOrderStatus 订单状态
type VipOrderStatus int32
const (
VipOrderPending VipOrderStatus = 1 // 待支付
VipOrderSuccess VipOrderStatus = 2 // 支付成功
VipOrderFailed VipOrderStatus = 3 // 支付失败
)
func (s VipOrderStatus) Desc() string {
switch s {
case VipOrderPending:
return "待支付"
case VipOrderSuccess:
return "支付成功"
case VipOrderFailed:
return "支付失败"
}
return "未知"
}
// PayMode 支付方式
const (
PayModeAlipay = "alipay" // 支付宝
PayModeWechat = "wechat" // 微信
)
// SubmitVipOrderInfo 第三方下单成功后的返回信息
type SubmitVipOrderInfo struct {
TradeNo string
Oid string // 第三方订单号
PayUrl string // 支付链接
PayUrlMode string // 支付链接模式(webview/scheme)
PayChannel string // 支付渠道
PayRate string // 费率
}
// VipOrderCallbackParam 支付回调参数(标准化后)
type VipOrderCallbackParam struct {
TradeNo string // 本地订单号
Oid string // 第三方订单号
RealAmount int64 // 实际支付金额(分)
PaymentAt interface{} // 支付时间(time.Time)
}
func GetTrandNoWithUUID() string {
return AppNameZhifuUUID + maths.GenUUID()
}