Browse Source

更新

tags/v1.6.1^2
huangjiajun 1 year ago
parent
commit
7d2146b6c2
1 changed files with 1 additions and 10 deletions
  1. +1
    -10
      lib/local_wechat/api.go

+ 1
- 10
lib/local_wechat/api.go View File

@@ -142,17 +142,8 @@ func TradePcPay(client *wechat.Client, subject, orderID, amount, notifyUrl, prod
_ = zhios_pay_logx.Warn(err) _ = zhios_pay_logx.Warn(err)
return nil, err return nil, err
} }
_, err = wechat.VerifySign(client.ApiKey, wechat.SignType_MD5, wxRsp)
if err != nil {
_ = zhios_pay_logx.Warn(err)
return nil, err
}
timeStamp := strconv.FormatInt(time.Now().Unix(), 10)
packages := "prepay_id=" + wxRsp.PrepayId
paySign := wechat.GetH5PaySign(client.AppId, wxRsp.NonceStr, packages, wechat.SignType_MD5, timeStamp, client.ApiKey)
fmt.Println("paySign===", paySign)
r := map[string]string{ r := map[string]string{
"redirect_url": wxRsp.MwebUrl,
"code_url": wxRsp.CodeUrl,
} }
return r, nil return r, nil
} }


Loading…
Cancel
Save