fd5f56f7de
- 微信支付 V3 Native 渠道 (wechat.go):Native下单/回调AES-GCM解密验签/查单 - 支付宝:手机网站支付 wap.pay + 按 UA 自适应(PC page.pay扫码 / 手机拉App);qr_pay_mode=2 完整扫码收银台 - 业务对接:下单接口扩展(biz_system/biz_ref/return_url)+ HMAC 签名鉴权;支付成功 webhook 主动推送业务方 + 60s 重试 + BizNotifyLog - 通用多业务:config.biz 改 map,加业务只改配置(BIZ_<SYS>_SECRET/_CALLBACK_URL) - seedPlans:四档真实套餐 + promo_first_month(¥1) + test_liandiao(0.01),均挂 biz_code;/products 暴露 biz_code - 删除沙箱 pay.html;对接设计文档入 docs Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019UQmqWmV67sXGLrb3U1XXn
17 lines
898 B
Go
17 lines
898 B
Go
package model
|
|
|
|
// Product 固定套餐/商品。价格以本表为准(服务端权威价),绝不信任前端传值。
|
|
// 金额用 string 存(如 "0.01"),与支付宝 total_amount 口径一致,避免浮点误差。
|
|
type Product struct {
|
|
Base
|
|
MerchantID uint64 `gorm:"index;not null" json:"merchant_id"`
|
|
Name string `gorm:"size:128;not null" json:"name"`
|
|
Description string `gorm:"size:255" json:"description"`
|
|
Price string `gorm:"size:20;not null" json:"price"` // 元,两位小数
|
|
Active bool `gorm:"default:true" json:"active"`
|
|
Sort int `json:"sort"`
|
|
// BizCode 稳定套餐码(如 annual_standard),业务 webhook 回传,供业务方按码映射权益(时长/档位),
|
|
// 避免业务方硬编码数字 product_id。空=无业务语义(纯测试套餐)。
|
|
BizCode string `gorm:"size:64;index" json:"biz_code,omitempty"`
|
|
}
|