- 微信卡券addWxCard领取问题
签名错误 - 创建卡券时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,[代码][代码] [代码][代码]})[代码][代码] [代码][代码]})[代码][代码]}[代码]急求解答
2019-02-14 - 微信卡券领取出现已领完问题
微信版本7.0.3 wxAddCard显示已领完 [图片] 根据官方提示进行错误排除: 库存足够 参数如下: nonce_str: "gnLFdYm2Anj0gDrK" timestamp: 1549972572 并进行了等待5s后调用wxAddCard依然出现已领完 卡券签名是用公众号签名获取的, 并且发送卡券消息时可以正常领取. 求解答.
2019-02-12