{
errcode: 90011,
errmsg: '[pay_sig] pay_sig is invalid traceid: 33616344, raw post_body(remove wrapped []): [{"offer_id":"1450053023","openid":"okj8p5Lw0Fby5gZgxSUbHv-SgDLA
","ts":1685602660,"zone_id":"1","env":1}], base64_encoded_post_body: eyJvZmZlcl9pZCI6IjE0NTAwNTMwMjMiLCJvcGVuaWQiOiJva2o4cDVMdzBGYnk1Z1pneFNVYkh2LVNnRExBIiwi
dHMiOjE2ODU2MDI2NjAsInpvbmVfaWQiOiIxIiwiZW52IjoxfQ== rid: 64784164-74a87c3b-11a06b5f'
}
我检查了一下我post_body是一致的,以下是我签名的js代码
let stringSignTemp = `/wxa/game/getbalance&${JSON.stringify(sendObj)}`
const sig = crypto.createHmac('sha256', appKey).update(stringSignTemp, 'utf8').digest('hex');
let stringSignTemp = `/wxa/game/getbalance&${JSON.stringify(sendObj)}`
----------
stringSignTemp里面的`${JSON.stringify(sendObj)}`和post body是否完全一致,然后env是沙箱环境,appKey也需要用沙箱的appKey