Closed ywanhzy closed 3 months ago
const params = { apiSecret: apiV3Key, body: bodys, signature: headers["wechatpay-signature"], serial: headers["wechatpay-serial"], nonce: headers["wechatpay-nonce"], timestamp: headers["wechatpay-timestamp"], }; const ret = await pay.verifySign(params);
验签返回false
调用pay.decipher_gcm解密接口数据都返回正确
回调不需要验证签名, 这是主动请求微信 微信参数返回的验证
const params = { apiSecret: apiV3Key, body: bodys, signature: headers["wechatpay-signature"], serial: headers["wechatpay-serial"], nonce: headers["wechatpay-nonce"], timestamp: headers["wechatpay-timestamp"], }; const ret = await pay.verifySign(params); 验签返回false 调用pay.decipher_gcm解密接口数据都返回正确
回调不需要验证签名, 这是主动请求微信 微信参数返回的验证
但微信文档说---商户应当验证签名,以确认请求来自微信 加密不能保证通知请求来自微信。微信会对发送给商户的通知进行签名,并将签名值放在通知的HTTP头Wechatpay-Signature。商户应当验证签名,以确认请求来自微信,而不是其他的第三方。签名验证的算法请参考 《微信支付API v3签名验证》。
const params = { apiSecret: apiV3Key, body: bodys, signature: headers["wechatpay-signature"], serial: headers["wechatpay-serial"], nonce: headers["wechatpay-nonce"], timestamp: headers["wechatpay-timestamp"], }; const ret = await pay.verifySign(params); 验签返回false 调用pay.decipher_gcm解密接口数据都返回正确
回调不需要验证签名, 这是主动请求微信 微信参数返回的验证
但微信文档说---商户应当验证签名,以确认请求来自微信 加密不能保证通知请求来自微信。微信会对发送给商户的通知进行签名,并将签名值放在通知的HTTP头Wechatpay-Signature。商户应当验证签名,以确认请求来自微信,而不是其他的第三方。签名验证的算法请参考 《微信支付API v3签名验证》。
同样的问题,请问你解决了吗?支付通知回调应该怎么处理?谢谢!
const params = { apiSecret: apiV3Key, body: bodys, signature: headers["wechatpay-signature"], serial: headers["wechatpay-serial"], nonce: headers["wechatpay-nonce"], timestamp: headers["wechatpay-timestamp"], }; const ret = await pay.verifySign(params);
验签返回false
调用pay.decipher_gcm解密接口数据都返回正确