激活代码
$data=array(
'init_bonus'=>0,
'init_bonus_record'=>'',
'init_balance'=> 0,
'membership_number'=> $no,
'code'=> $no,
'card_id'=> $param['cardid'],
'background_pic_url'=> '',
'init_custom_field_value1'=> $param['Mobile'],
'init_custom_field_value2'=> $param['UserName'],
);
$res=$jssdk->ActiveMemberCard(json_encode($data));
public function ActiveMemberCard($data){
$access_token=$this->getAccessToken();
$url='https://api.weixin.qq.com/card/membercard/activate?access_token='.$access_token;
$timeout=30;
return $this->httpPost($url,$data,$timeout);
}
领取的是公众号会员卡,代码在领卡成功之后激活会员卡,激活后返回信息{"errcode":0,"errmsg":"ok"},在查看卡包信息时发现会员卡还是未激活状态