🎨 新增支付动态配置&优化支付回调&新增三方支付

This commit is contained in:
2025-12-09 21:47:22 +08:00
parent eaa5cdc100
commit 854c16e11c
26 changed files with 2963 additions and 72 deletions

View File

@@ -38,7 +38,8 @@ type Server struct {
// MCP配置
MCP MCP `mapstructure:"mcp" json:"mcp" yaml:"mcp"`
Wechat Wechat `mapstructure:"wechat" json:"wechat" yaml:"wechat"`
Pays []Pays `mapstructure:"pay-list" json:"pay-list" yaml:"pay-list"`
SMS SMS `mapstructure:"sms" json:"sms" yaml:"sms"`
Wechat Wechat `mapstructure:"wechat" json:"wechat" yaml:"wechat"`
Pays []Pays `mapstructure:"pay-list" json:"pay-list" yaml:"pay-list"`
ShenqiPay ShenqiPay `mapstructure:"shenqi-pay" json:"shenqi-pay" yaml:"shenqi-pay"`
SMS SMS `mapstructure:"sms" json:"sms" yaml:"sms"`
}

23
config/shenqi_pay.go Normal file
View File

@@ -0,0 +1,23 @@
package config
// ShenqiPay 神奇支付配置
type ShenqiPay struct {
// Enable 是否启用
Enable bool `mapstructure:"enable" json:"enable" yaml:"enable"`
// PID 商户ID
PID int `mapstructure:"pid" json:"pid" yaml:"pid"`
// PrivateKey 商户私钥
// 支持格式: 纯Base64字符串 或 完整PEM格式
// 示例: MIIEvgIBxxxx... 或 -----BEGIN PRIVATE KEY-----\nMIIEvgIBxxxx...\n-----END PRIVATE KEY-----
PrivateKey string `mapstructure:"private-key" json:"private-key" yaml:"private-key"`
// PlatformPubKey 平台公钥
// 支持格式: 纯Base64字符串 或 完整PEM格式
// 示例: MIIBIjANxxxx... 或 -----BEGIN PUBLIC KEY-----\nMIIBIjANxxxx...\n-----END PUBLIC KEY-----
PlatformPubKey string `mapstructure:"platform-pub-key" json:"platform-pub-key" yaml:"platform-pub-key"`
// NotifyURL 异步通知地址
NotifyURL string `mapstructure:"notify-url" json:"notify-url" yaml:"notify-url"`
// ReturnURL 同步跳转地址
ReturnURL string `mapstructure:"return-url" json:"return-url" yaml:"return-url"`
// BaseURL API基础地址 (可选,默认 https://www.shenqiyzf.cn)
BaseURL string `mapstructure:"base-url" json:"base-url" yaml:"base-url"`
}