有一个微信卡包激活的问题咨询一下。下面是调用的接口以及参数和返回值。
为什么第二步返回值有乱码,然后第三步报错了返回 40056,也有成功没有乱码的案例,但不知道为什么,怎么解决这个问题啊?
异常
一、[用户]执行了[激活会员]方法名:activeMember
参数:【cardId = pfOBH5_DdPqBstwHJg9l4O0oM-kA; ticket = fDZv9eMQAFfrNr3XBoqhb5PFk2JOS+4n3S7kuErdo47rFPIyUrl/T6rRmssGWWK3rdJnULi/Hkt7sPzVLR9zZnmArvoOpGPIUUWb3vRS7wM=;
openid = ofOBH57cTH6ZxkOrRQxYbgqZxWKw; encryptCode = ROJ9viMUmvVGqhMLLHNrac1IAnLQLIOTVprmI1zvLW8=;
outer_str = eyJjbGllbnQiOiIxMDAwMDAxMyIsImNyb3BJZCI6Ind3YjM4MjQ5MTQ0NmYyZDljZSIsImV4dGVybmFsVXNlcklEIjoid21YRUhNRFFBQU5RYVJ2OHBvZ1d2VFlLOUItM0NUYmciLCJvcmdDb2RlIjoiMTAwMDAwIiwic3RvQ29kZSI6IjEwMDEyIiwidXNlcklkIjoiMTE1NSIsInd3VXNlcklkIjoiMTEwMTEwIn0=; 】
二、解码
https://api.weixin.qq.com/card/code/decrypt?access_token=
解码接口,参数:{encrypt_code=ROJ9viMUmvVGqhMLLHNrac1IAnLQLIOTVprmI1zvLW8%3D}, 返回:{"errcode":0,"errmsg":"ok","code":"246136199242[��z����O"}
三、激活
https://api.weixin.qq.com/card/membercard/activate?access_token=
参数:{"card_id":"pfOBH5_DdPqBstwHJg9l4O0oM-kA","code":"246136199242[��z�\u007F���O","membership_number":"VM22110325OXE258W1"}, 返回:{"errcode":40056,"errmsg":"invalid serial code hint: [jlOfPA0453r280]"}
正常
一、[用户]执行了[激活会员]方法名:activeMember
参数:【cardId = pu0HnszyIi8nxF9VrO8SVDOkkgKc; ticket = fDZv9eMQAFfrNr3XBoqhby/ytvdL9dD+DF+kFpmge+hqzUwfae93ZWxCVxB7dw/b02DiwKcP9URk6raQpSVByj7ZVliY7jwHlyZ1BRHVzNM=;
openid = ou0Hns1ibm_kNa-Xt6oT5WCaVecY; encryptCode = OdAkNcq+pJV1CR7cWuSQPPOFR93oP544jg592Jn1jpI=;
outer_str = eyJjbGllbnQiOiIxMDAwMDM2OCIsImNyb3BJZCI6Ind3YmQwOTIzM2E0NTI5YjhmNCIsImV4dGVybmFsVXNlcklEIjoid205eDRPRVFBQS1iVVRXZ2tGSW1VZ0VIRmRuU0RPN2ciLCJvcmdDb2RlIjoiMTAwMDAwIiwic3RvQ29kZSI6IjMzMCIsInVzZXJJZCI6IjE2MzgiLCJ3d1VzZXJJZCI6Ikt1VGluZyJ9; 】
二、解码
https://api.weixin.qq.com/card/code/decrypt?access_token=
解码接口,参数:{encrypt_code=OdAkNcq%2BpJV1CR7cWuSQPPOFR93oP544jg592Jn1jpI%3D}, 返回:{"errcode":0,"errmsg":"ok","code":"638394028522"}
三、激活
https://api.weixin.qq.com/card/membercard/activate?access_token=
接口,参数:{"card_id":"pu0HnszyIi8nxF9VrO8SVDOkkgKc","code":"638394028522","membership_number":"9900261532"}, 返回:{"errcode":0,"errmsg":"ok"}