Skip to content

更改卡券信息接口bug,并非固定为member_card类型,应该是根据卡券的类型来定义 #41

@porist

Description

@porist

/** * 更改卡券信息接口 * @param string $card_id * @param array $member_card * @return array * @throws Exceptions\InvalidResponseException * @throws Exceptions\LocalCacheException */ public function updateCard($card_id, array $member_card) { $url = "https://api.weixin.qq.com/card/update?access_token=ACCESS_TOKEN"; $this->registerApi($url, __FUNCTION__, func_get_args()); return $this->httpPostForJson($url, ['card_id' => $card_id, 'member_card' => $member_card]); }

member_card 传参应该由传入者根据卡券类型定义。
//填写该cardid相应的卡券类型(小写)。

以下为官方文档

{ "card_id":"ph_gmt7cUVrlRk8swPwx7aDyF-pg", "member_card": { //填写该cardid相应的卡券类型(小写)。 "base_info": { "logo_url": "http:\/\/www.supadmin.cn\/uploads\/allimg\/120216\/1_120216214725_1.jpg", "color": "Color010", "notice": "使用时向服务员出示此券", "service_phone": "020-88888888", "description": "不可与其他优惠同享\n如需团购券发票,请在消费时向商户提出\n店内均可使用, 仅限堂食\n餐前不可打包,餐后未吃完,可打包\n本团购券不限人数,建议2人使用, 超过建议人数须另收酱料费5元/位\n本单谢绝自带酒水饮料" "location_id_list" : [123, 12321, 345345] }, "bonus_cleared": "aaaaaaaaaaaaaa", "bonus_rules": "aaaaaaaaaaaaaa", "prerogative": "" } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions