fix
This commit is contained in:
parent
c9e8367bb4
commit
de8a2829d2
@ -494,7 +494,7 @@ func (this *MainServiceApi) WxPayNotify(c *gin.Context) {
|
||||
}
|
||||
|
||||
f5.GetSysLog().Debug("wx pay post data:%s", rawdata)
|
||||
rawstr := fmt.Sprintf("%s\n%s\n%s", paytimestamp, paynonce, rawdata)
|
||||
rawstr := fmt.Sprintf("%s\n%s\n%s\n", paytimestamp, paynonce, rawdata)
|
||||
if !service.Wxpay.VerifyPaySign(rawstr, paysign) {
|
||||
c.JSON(501, failrspobj)
|
||||
return
|
||||
|
@ -38,14 +38,13 @@ func (wp *wxpay) initMch() {
|
||||
wp.ctx = context.Background()
|
||||
// 使用商户私钥等初始化 client,并使它具有自动定时获取微信支付平台证书的能力
|
||||
opts := []core.ClientOption{
|
||||
// option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key),
|
||||
option.WithWechatPayPublicKeyAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchPubKeyId, mchPublicKey),
|
||||
}
|
||||
wp.client, err = core.NewClient(wp.ctx, opts...)
|
||||
if err != nil {
|
||||
f5.GetSysLog().Alert("new wechat pay client err:%s", err)
|
||||
}
|
||||
|
||||
|
||||
go wp.checkGameMediaId()
|
||||
|
||||
wp.payhtmlstr, err = f5.ReadJsonFile("../config/payhtml.template")
|
||||
|
Loading…
x
Reference in New Issue
Block a user