🎨 优化路由跨域,修改微信商户配置

This commit is contained in:
2025-07-19 06:19:09 +08:00
parent 8106282c8b
commit fa0234d385
3 changed files with 10 additions and 8 deletions

View File

@@ -65,6 +65,7 @@ func RegisterTables() {
example.ExaAttachmentCategory{},
app.Banner{},
app.Order{},
)
if err != nil {
global.GVA_LOG.Error("register table failed", zap.Error(err))

View File

@@ -69,6 +69,7 @@ func Routers() *gin.Engine {
PrivateGroup.Use(middleware.JWTAuth()).Use(middleware.CasbinHandler()).Use(middleware.Cors())
AppAuthGroup := Router.Group(global.GVA_CONFIG.System.RouterPrefix)
AppAuthGroup.Use(middleware.Cors())
//AppAuthGroup.Use(middleware.UserJWTAuth()).Use(middleware.Cors())
{
// 健康监测

View File

@@ -40,14 +40,14 @@ func InitWeOfficial() {
// InitWechatPay 初始化微信支付
func InitWechatPay() {
PaymentService, err := payment.NewPayment(&payment.UserConfig{
AppID: "[app_id]", // 小程序、公众号或者企业微信的appid
MchID: "[mch_id]", // 商户号 appID
MchApiV3Key: "[mch_api_v3_key]", // 微信V3接口调用必填
Key: "[key]", // 微信V2接口调用必填
CertPath: "[wx_cert_path]", // 商户后台支付的Cert证书路径
KeyPath: "[wx_key_path]", // 商户后台支付的Key证书路径
SerialNo: "[serial_no]", // 商户支付证书序列号
NotifyURL: "[notify_url]", // 微信支付回调地址
AppID: "wx3d21df18d7f8f9fc\n", // 小程序、公众号或者企业微信的appid
MchID: "[mch_id]", // 商户号 appID
MchApiV3Key: "1a3sd8561d5179Df152D4789aD38wG9s", // 微信V3接口调用必填
Key: "57s14dFG915486Sd5617f23d45f671Ad", // 微信V2接口调用必填
CertPath: "[wx_cert_path]", // 商户后台支付的Cert证书路径
KeyPath: "[wx_key_path]", // 商户后台支付的Key证书路径
SerialNo: "[serial_no]", // 商户支付证书序列号
NotifyURL: "[notify_url]", // 微信支付回调地址
HttpDebug: true,
Log: payment.Log{
Level: "debug",