微信公众平台自制会员卡可以通过微信经营收款码或者绑定微信支付的商户的商业收款码收款进行自动积分及折扣吗?
24条回答 默认 最新
关注获得0.30元问题酬金 让阿豪来帮你解答,本回答参考chatgpt3.5编写提供,如果还有疑问可以评论或留言
回答: 微信公众平台自制会员卡可以通过微信支付的商户的商业收款码进行自动积分及折扣,但不支持利用微信经营收款码进行自动积分及折扣。 解释: 微信公众平台自制会员卡是一种可以通过微信公众号来创建并管理的会员卡。商户可以通过设置不同的积分规则和折扣规则,来吸引更多的用户进行购买和消费。 自动积分及折扣是其中一个重要的功能,可以让用户在每次会员消费时自动获得相应的积分,并获得相应的折扣。 微信支付的商户收款码是一种通过微信支付收款的一维码或二维码,商户可以通过扫描该码来进行支付收款。在微信公众平台创建并设置了会员卡后,商户可以将该收款码绑定到会员卡中,并设置相应的积分规则和折扣规则。 一个简单的绑定商户收款码的示例代码如下:import requests # 获取access_token APPID = 'your_appid' APPSECRET = 'your_appsecret' url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={}&secret={}'.format(APPID, APPSECRET) res = requests.get(url) access_token = res.json()['access_token'] # 创建会员卡 create_card_url = 'https://api.weixin.qq.com/card/create?access_token=' + access_token data = { "card": { "card_type": "MEMBER_CARD", "member_card": { "background_pic_url": "http://mmbiz.qpic.cn/mmbiz_jpg/hCgJhvHDaBic8Nt0u8lBzPtsibw9Ip4DWkdckEzricZshI1zgo3HGEUmJPkc2JSSvLC6rDj5A4ib2CiboLrGy8Tj5g/640?wx_fmt=jpeg", "base_info": { "logo_url": "http://mmbiz.qpic.cn/mmbiz_png/hCgJhvHDaBic8Nt0u8lBzPtsibw9Ip4DWkqB1WXEfUibReiptP0vOOwEdxCZAc4LGsuMNwnbPcMHtk8ibJjwZBYeWg/640?wx_fmt=png", "code_type": "CODE_TYPE_QRCODE", "brand_name": "GHOST CASTLE", "title": "VIP会员卡", "color": "Color010", "notice": "使用时向收银员出示该卡", "service_phone": "186xxxxxxxx", "description": "不可与其他优惠同享", "date_info": { "type": "DATE_TYPE_PERMANENT" }, "sku": { "quantity": 100000000 }, "get_limit": 1, "use_custom_code": False, "can_give_friend": True, "location_id_list": [], "use_all_locations": False, "center_title": "VIP会员", "center_sub_title": "会员权益", "center_url": "http://www.xxx.com", "custom_url_name": "会员中心", "custom_url": "http://www.xxx.com/member", "custom_url_sub_title": "查看会员详情", "promotion_url_name": "优惠券", "promotion_url": "http://www.xxx.com/promotion", "need_push_on_view": True }, "auto_activate": True, "supply_bonus": True, "supply_balance": False, "custom_field1": { "name_type": "FIELD_NAME_TYPE_DISCOUNT", "url": "http://www.xxx.com/discount" }, "bonus_rule": { "cost_money_unit": 100, "increase_bonus": 1, "max_increase_bonus": 200, "init_increase_bonus": 10, "cost_bonus_unit": 5, "reduce_money": 100 }, "prerogative": "使用会员卡特权", "discount": 10 } } } res = requests.post(create_card_url, json=data) card_id = res.json()['card_id'] # 绑定商户收款码 bind_qrcode_url = 'https://api.weixin.qq.com/card/paycell/set?access_token=' + access_token data = { "card_id": card_id, "is_open": True, "need_push_on_view": True, "paycell": { "self_define": { "url": "weixin://wxpay/bizpayurl?sign=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&appid=XXXXXXXX&productid=2548&openid=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" } } } res = requests.post(bind_qrcode_url, json=data) if res.json()['errcode'] == 0: print('绑定商户收款码成功') else: print('绑定商户收款码失败')需要注意的是:微信支付的商户收款码需要是能够扫描支付的正式商户收款码,而微信经营收款码是仅限通过微信支付特约商户服务才能申请生成的收款码,因此无法用于自动积分及折扣。
解决 无用评论 打赏 举报