修改了配置文件
This commit is contained in:
parent
4f47c2922e
commit
301b11fa4e
@ -152,9 +152,14 @@ func (r *Pay) GetPayOrder(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
appId := config.C.Wechat.AppId
|
||||
if config.C.Env == "dev" {
|
||||
appId = config.C.Wechat.TestPayAppId
|
||||
}
|
||||
|
||||
// 处理返回数据
|
||||
g := app.PayOrderDataResponse{
|
||||
AppId: config.C.Wechat.TestPayAppId,
|
||||
AppId: appId,
|
||||
Total: paymentAmountTotal,
|
||||
Description: "肝病算一算",
|
||||
OpenId: user.OpenId,
|
||||
|
||||
@ -364,8 +364,13 @@ func (r *OrderSingleService) GetJsapiPrepay(m *model.OrderSingle) (prepay *jsapi
|
||||
return nil, errors.New("发起支付失败")
|
||||
}
|
||||
|
||||
appId := config.C.Wechat.AppId
|
||||
if config.C.Env == "dev" {
|
||||
appId = config.C.Wechat.TestPayAppId
|
||||
}
|
||||
|
||||
jsapiRequest := weChat.JsapiRequest{
|
||||
AppId: config.C.Wechat.TestPayAppId,
|
||||
AppId: appId,
|
||||
MchId: config.C.Wechat.Pay1281030301.MchId,
|
||||
Description: "肝病算一算",
|
||||
OutTradeNo: m.OrderNo,
|
||||
@ -398,8 +403,13 @@ func (r *OrderSingleService) GetAppPrepay(m *model.OrderSingle) (prepay *app.Pre
|
||||
return nil, errors.New("发起支付失败")
|
||||
}
|
||||
|
||||
appId := config.C.Wechat.AppId
|
||||
if config.C.Env == "dev" {
|
||||
appId = config.C.Wechat.TestPayAppId
|
||||
}
|
||||
|
||||
appRequest := weChat.AppRequest{
|
||||
AppId: config.C.Wechat.TestPayAppId,
|
||||
AppId: appId,
|
||||
MchId: config.C.Wechat.Pay1281030301.MchId,
|
||||
Description: "肝病算一算",
|
||||
OutTradeNo: m.OrderNo,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user