From a6c3407ad7134407cf1a3ecf518bc6262fd32529 Mon Sep 17 00:00:00 2001 From: tommy <3405129587@qq.com> Date: Tue, 21 Jul 2020 15:36:11 +0800 Subject: [PATCH] fix:bug --- services/pay/order.go | 4 +--- utils/define/config.go | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/services/pay/order.go b/services/pay/order.go index 1c7e697..a3f20d9 100644 --- a/services/pay/order.go +++ b/services/pay/order.go @@ -13,8 +13,6 @@ import ( "time" ) -const CallbackOrderUrl = "https://api.ouxuanhudong.com/PcClient/common/WeChatOauthCtl/callbackOrder" - func UnifiedOrder(content, openId string, fee, goodType, userId, activityId, expireAt int64) (map[string]interface{}, error) { client, err := Client() if err != nil { @@ -27,7 +25,7 @@ func UnifiedOrder(content, openId string, fee, goodType, userId, activityId, exp body["body"] = content body["out_trade_no"] = outTradeNo body["total_fee"] = fmt.Sprint(fee) - body["notify_url"] = CallbackOrderUrl + body["notify_url"] = define.CallbackOrderUrl body["trade_type"] = "JSAPI" body["nonce_str"] = nonceStr body["sign_type"] = pay_core.SignType_MD5 diff --git a/utils/define/config.go b/utils/define/config.go index b57df94..843c868 100644 --- a/utils/define/config.go +++ b/utils/define/config.go @@ -13,9 +13,12 @@ func SetDebug(modes ...bool) { HOST = "https://hdzj.utools.club" H5Host = "http://ouxuanhudongtest.t.3pr.com.cn/web" SendUrl = "https://hdzjws.utools.club/PcClient/Ws/MessageCtl/Receive" + CallbackOrderUrl = "https://hdzj.utools.club/PcClient/common/WeChatOauthCtl/callbackOrder" } } +var CallbackOrderUrl = "https://api.ouxuanhudong.com/PcClient/common/WeChatOauthCtl/callbackOrder" + var ( SendUrl = "https://api.ouxuanhudong.com:20182/PcClient/Connect/MessageCtl/Receive" HOST = "https://api.ouxuanhudong.com"