Merge branch 'emdash/wechat-official-account-payment-integration-30g'
# Conflicts: # README.md # cmd/api/main.go # internal/bootstrap/dependencies.go # pkg/config/config.go # pkg/config/defaults/config.yaml
This commit is contained in:
@@ -23,7 +23,11 @@ type Config struct {
|
||||
JWT JWTConfig `mapstructure:"jwt"`
|
||||
DefaultAdmin DefaultAdminConfig `mapstructure:"default_admin"`
|
||||
Storage StorageConfig `mapstructure:"storage"`
|
||||
<<<<<<< HEAD
|
||||
Gateway GatewayConfig `mapstructure:"gateway"`
|
||||
=======
|
||||
Wechat WechatConfig `mapstructure:"wechat"`
|
||||
>>>>>>> emdash/wechat-official-account-payment-integration-30g
|
||||
}
|
||||
|
||||
// ServerConfig HTTP 服务器配置
|
||||
@@ -156,6 +160,35 @@ type PresignConfig struct {
|
||||
DownloadExpires time.Duration `mapstructure:"download_expires"` // 下载 URL 有效期(默认:24h)
|
||||
}
|
||||
|
||||
// WechatConfig 微信配置
|
||||
type WechatConfig struct {
|
||||
OfficialAccount OfficialAccountConfig `mapstructure:"official_account"`
|
||||
Payment PaymentConfig `mapstructure:"payment"`
|
||||
}
|
||||
|
||||
// OfficialAccountConfig 微信公众号配置
|
||||
type OfficialAccountConfig struct {
|
||||
AppID string `mapstructure:"app_id"`
|
||||
AppSecret string `mapstructure:"app_secret"`
|
||||
Token string `mapstructure:"token"`
|
||||
AESKey string `mapstructure:"aes_key"`
|
||||
OAuthRedirectURL string `mapstructure:"oauth_redirect_url"`
|
||||
}
|
||||
|
||||
// PaymentConfig 微信支付配置
|
||||
type PaymentConfig struct {
|
||||
AppID string `mapstructure:"app_id"`
|
||||
MchID string `mapstructure:"mch_id"`
|
||||
APIV3Key string `mapstructure:"api_v3_key"`
|
||||
APIV2Key string `mapstructure:"api_v2_key"`
|
||||
CertPath string `mapstructure:"cert_path"`
|
||||
KeyPath string `mapstructure:"key_path"`
|
||||
SerialNo string `mapstructure:"serial_no"`
|
||||
NotifyURL string `mapstructure:"notify_url"`
|
||||
HttpDebug bool `mapstructure:"http_debug"`
|
||||
Timeout time.Duration `mapstructure:"timeout"`
|
||||
}
|
||||
|
||||
type requiredField struct {
|
||||
value string
|
||||
name string
|
||||
|
||||
@@ -105,9 +105,31 @@ default_admin:
|
||||
password: ""
|
||||
phone: ""
|
||||
|
||||
<<<<<<< HEAD
|
||||
# Gateway 服务配置
|
||||
gateway:
|
||||
base_url: "https://lplan.whjhft.com/openapi"
|
||||
app_id: "60bgt1X8i7AvXqkd"
|
||||
app_secret: "BZeQttaZQt0i73moF"
|
||||
timeout: 30
|
||||
=======
|
||||
# 微信配置(必填项需通过环境变量设置)
|
||||
wechat:
|
||||
official_account:
|
||||
app_id: "" # 必填:JUNHONG_WECHAT_OFFICIAL_ACCOUNT_APP_ID
|
||||
app_secret: "" # 必填:JUNHONG_WECHAT_OFFICIAL_ACCOUNT_APP_SECRET(敏感)
|
||||
token: "" # 可选:JUNHONG_WECHAT_OFFICIAL_ACCOUNT_TOKEN
|
||||
aes_key: "" # 可选:JUNHONG_WECHAT_OFFICIAL_ACCOUNT_AES_KEY(敏感)
|
||||
oauth_redirect_url: "" # 可选:JUNHONG_WECHAT_OFFICIAL_ACCOUNT_OAUTH_REDIRECT_URL
|
||||
payment:
|
||||
app_id: "" # 必填:JUNHONG_WECHAT_PAYMENT_APP_ID
|
||||
mch_id: "" # 必填:JUNHONG_WECHAT_PAYMENT_MCH_ID
|
||||
api_v3_key: "" # 必填:JUNHONG_WECHAT_PAYMENT_API_V3_KEY(敏感)
|
||||
api_v2_key: "" # 可选:JUNHONG_WECHAT_PAYMENT_API_V2_KEY(敏感)
|
||||
cert_path: "" # 必填:JUNHONG_WECHAT_PAYMENT_CERT_PATH(证书文件路径)
|
||||
key_path: "" # 必填:JUNHONG_WECHAT_PAYMENT_KEY_PATH(私钥文件路径)
|
||||
serial_no: "" # 必填:JUNHONG_WECHAT_PAYMENT_SERIAL_NO
|
||||
notify_url: "" # 必填:JUNHONG_WECHAT_PAYMENT_NOTIFY_URL
|
||||
http_debug: false
|
||||
timeout: "30s"
|
||||
>>>>>>> emdash/wechat-official-account-payment-integration-30g
|
||||
|
||||
Reference in New Issue
Block a user