Lee-WineList/config/tencent.go
2023-04-27 15:56:12 +08:00

30 lines
1.1 KiB
Go

package config
// 腾讯相关配置
type tencentConfig struct {
MiniApp wechatMiniAppConfig `mapstructure:"mini-app" yaml:"mini-app"`
Payment wechatPayConfig `mapstructure:"payment" yaml:"payment"`
CApi capiConfig `mapstructure:"capi" yaml:"capi"`
}
// 微信小程序配置
type wechatMiniAppConfig struct {
AppId string `mapstructure:"app-id" yaml:"app-id"`
AppSecret string `mapstructure:"app-secret" yaml:"app-secret"`
}
// 微信支付配置
type wechatPayConfig struct {
MchId string `mapstructure:"mchId" yaml:"mchId"` // 商户号
SerialNo string `mapstructure:"serialNo" yaml:"serialNo"` // 商户API证书的证书序列号
ApiV3Key string `mapstructure:"apiV3Key" yaml:"apiV3Key"` // 支付key
PrivateKey string `mapstructure:"privateKey" yaml:"privateKey"` // 支付私钥绝对路径
}
// api密钥配置
type capiConfig struct {
AppId string `mapstructure:"app-id" yaml:"app-id"` // APP ID
SecretId string `mapstructure:"secret-id" yaml:"secret-id"` // Secret ID
SecretKey string `mapstructure:"secret-key" yaml:"secret-key"` // Secret Key
}