签名错误
- 创建卡券时bind_openid=false
- 生成签名时timestamp为str, api_ticket是用公众号app_id生成的
仍然报签名错误
{"cards": [{"cardExt" :{ "nonce_str" : "WGFUzN6qTIXNd2Gb" , "code" : "0919021413150077" , "signature" : "31ab0efb0cd33109d98d141231b96c540e44a621" , "timestamp" :1550121300}, "carId" : "pdlr3wJpoQStE-nUTVZhF53QtE14"} ] } |
小程序代码
export function addWxCard(cards) { return new Promise((resolve, reject) => { const cardList = cards.map(card => { const { cardId, cardExt } = card return { cardId, cardExt: JSON.stringify({ code: cardExt.code, timestamp: card.timeStamp, signature: card.signature, nonce_str: cardExt.nonceStr, }) } }) wx.addCard({ cardList, success: resolve, fail: reject, }) }) } |
急求解答
您好,请按照这个文档排查:https://mp.weixin.qq.com/s/WhYpWmfuhUBw2wseTXdt2A
你好, 创建微信卡券和获取ticket的access_token不同会导致签名错误么
您好,有效时间是2小时,这个您测试一下看看。