这个现在可以了吗?
wx.addCard 接口可以添加礼品卡吗请问这个接口能否添加礼品卡呢? 我的意思,不是使用你们官方提供的固定的礼品卡小程序模板去开发。而是完全自己编写代码,实现微信支付等流程,然后在适当时机调用 wx.addCard 把礼品卡添加到用户的卡包里。 目前我调试发现优惠券是可以成功加入到卡包的,但是礼品卡不行。一直显示“已领取”,回到上一页时,得到 wx.addCard 的 fail 回调,内容是 errMsg: "addCard:fail cancel" 。 请问这可能是什么原因呢?还是这个接口不支持这样操作啊
2023-11-22解决了吗?
wx.addCard提示已领取是什么情况?卡券已经创建成功,下面是查询卡券接口返回的信息 {"errcode":0,"errmsg":"ok","card":{"card_type":"GENERAL_CARD","general_card":{"base_info":{"id":"pVVPA0qv01yCbtCbvmIu1DQ1MhsQ","logo_url":"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/KnaT5OkmyMIDib248A0wQvFyd62VztW1VouOm5H0h5ib93FmDNf28QOlGmFF0aicHd5nic2BNLppnyAaB96XHb46Jw\/0","code_type":"CODE_TYPE_QRCODE","brand_name":"广东赛壹","title":"200元预付费卡","date_info":{"type":"DATE_TYPE_PERMANENT"},"color":"#9062c0","notice":"使用时向收银员出示二维码","description":"礼品卡享受更多优惠","location_id_list":[],"get_limit":0,"status":"CARD_STATUS_VERIFY_OK","sku":{"quantity":99999999,"total_quantity":99999999},"create_time":1611714505,"update_time":1611714515,"custom_url_name":"赠送好友","custom_url":"pages\/homepage\/homepage","promotion_url":"https:\/\/www.7-11.cn\/Facilitate\/ArticleList.aspx?CID=15","promotion_url_name":"产品介绍","need_push_on_view":true,"use_all_locations":true,"center_title":"立即使用","center_url":"https:\/\/devact.dmall.com\/dac\/card_bag\/?hideCustomNavigationBar=true&bounces=false#\/singleConsumeDetails","area_code_list":[],"giftcard_info":{"price":20000},"max_give_friend_times":1},"supply_bonus":false,"supply_balance":true,"init_balance":20000,"prerogative":"礼品卡享受更多优惠","auto_activate":true,"sub_card_type":"GIFT_CARD","background_pic_url":"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/cBRVegnNQPyvSjoGfrgdbFWysdJiayDt3WSTDjEdDGn2UTjPb6Ue8XJSLbSXtAmXhnqZh4icBrRDUibsTl7j5IHlg\/0","advanced_info":{"time_limit":[],"text_image_list":[],"business_service":[],"consume_share_card_list":[],"share_friends":false}}}} wx.addCard的参数如下 [{"cardExt":"{\"nonce_str\":\"6jo17cq5990fn10674dq3\",\"signature\":\"c2dc88b37f7417d1e9b19f0fa3376cce108f0d65\",\"outer_str\":\"020000000010_53207287\",\"timestamp\":\"1611729200\"}","cardId":"pVVPA0qv01yCbtCbvmIu1DQ1MhsQ"}] 调用wx.addCard只有页面提示已领取,如下图 [图片] 说明一下:cardId是新创建的,不可能被别人领取,前端返回的isSuccess是false,也就是这次领取没成功,进入卡包也没有找到对应的卡。重新创建cardId依然返回已领取,isSuccess:false,不知道原因,求大神指教。
2023-11-22解决了没?我一样的问题
小程序真机 wx.addCard 一直返回 addCard:fail cancel是什么原因?传参如下(openid和cardId做了隐藏) cardExt: "{"api_ticket":"IpK_1T69hDhZkLQTlwsAXz_wGd7sIDvxSVLh6V95CzYvFLkm7FRE4Oh6CvreBNq8B3L4eGlwu54RPglSULnglA","timestamp":1681288344,"code":"1219642778018019066570","openid":"xxx","nonce_str":"1681288344EK0OA6WN4SGFR7G","signature":"8b2b6c85ba481d8524a1f6d532c1f98eb5340e76"}" cardId: "xxx" 一直提示:errMsg: "addCard:fail cancel",如有少传参数请告知
2023-11-22