This commit is contained in:
2025-12-31 16:54:17 +08:00
parent 4a48add783
commit a30d77845d
12 changed files with 688 additions and 20 deletions

View File

@@ -15,6 +15,7 @@ type Config struct {
Alipay AlipayConfig
Wxpay WxpayConfig
Applepay ApplepayConfig
EasyPay EasyPayConfig
Tianyuanapi TianyuanapiConfig
SystemConfig SystemConfig
WechatH5 WechatH5Config
@@ -33,20 +34,20 @@ type JwtAuth struct {
RefreshAfter int64
}
type VerifyCode struct {
AccessKeyID string
AccessKeySecret string
EndpointURL string
SignName string
TemplateCode string
ValidTime int
ComplaintTemplate string // 投诉通知短信模板
AccessKeyID string
AccessKeySecret string
EndpointURL string
SignName string
TemplateCode string
ValidTime int
ComplaintTemplate string // 投诉通知短信模板
}
type Encrypt struct {
SecretKey string
}
type AlipayConfig struct {
Enabled bool // 是否启用支付宝支付
Enabled bool // 是否启用支付宝支付
AppID string
PrivateKey string
AlipayPublicKey string
@@ -58,7 +59,7 @@ type AlipayConfig struct {
ReturnURL string
}
type WxpayConfig struct {
Enabled bool // 是否启用微信支付
Enabled bool // 是否启用微信支付
AppID string
MchID string
MchCertificateSerialNumber string
@@ -71,7 +72,7 @@ type WxpayConfig struct {
RefundNotifyUrl string
}
type ApplepayConfig struct {
Enabled bool // 是否启用Apple支付
Enabled bool // 是否启用Apple支付
ProductionVerifyURL string
SandboxVerifyURL string // 沙盒环境的验证 URL
Sandbox bool
@@ -84,7 +85,7 @@ type SystemConfig struct {
ThreeVerify bool
}
type WechatH5Config struct {
Enabled bool // 是否启用微信公众号登录
Enabled bool // 是否启用微信公众号登录
AppID string
AppSecret string
}
@@ -121,3 +122,14 @@ type PromotionConfig struct {
PromotionDomain string // 推广域名(用于生成短链)
OfficialDomain string // 正式站点域名(短链重定向的目标域名)
}
// EasyPayConfig 易支付配置
type EasyPayConfig struct {
Enabled bool // 是否启用易支付
ApiURL string // 接口地址
PID string // 商户ID
PKEY string // 商户密钥
CID string // 支付渠道ID
NotifyUrl string // 异步通知地址
ReturnUrl string // 页面跳转地址
}