说明:
该接口是通过卡号或持卡人信息 查询会员卡的详细信息,官方接口文档【会员卡查询】
开卡接口请参考该贴:[url]https://openclub.alipay.com/read.php?tid=1628&fid=71[/url]
代码调用示例:
public static void Card_Query(){ AlipayClient alipayClient=alipayclient(); AlipayMarketingCardQueryRequest request = new AlipayMarketingCardQueryRequest(); request.setBizContent("{" + //支付宝业务卡号,开卡接口中返回获取,开卡接口返回的值:"biz_card_no"对应该值 "\"target_card_no\":\"test_moban0000090544\"," + "\"target_card_no_type\":\"BIZ_CARD\"" + " }"); AlipayMarketingCardQueryResponse response = null; try { response = alipayClient.execute(request); System.out.println(response.getBody()); } catch (AlipayApiException e) { // TODO Auto-generated catch block e.printStackTrace(); } if(response.isSuccess()){ System.out.println("调用成功"); } else { System.out.println("调用失败"); } }
接口同步返回信息:
{"alipay_marketing_card_query_response":{"code":"10000","msg":"Success","card_info":{"balance":"111124.89","biz_card_no":"test_moban0000090544","external_card_no":"waibu_carhao","level":"VIP3","open_date":"2018-01-31 15:58:46","point":"8808","valid_date":"2050-02-20 21:20:46"}},"sign":"OwxoIXmvUur6AuMESXGkP6otUMilbxlT+xnrWnz5vqKFkJ/q9z0cmU0Hu6sVJ/s1mpx3vZ+1bBLJA8mOSBAv1F8NYZBz7G1mZvO3CGdzPdbB1FmTIvuTxhs9KGpV+MLv6TVbhvaTu738tiHqBjutVOv02ss1tQzp3hzg1UBe5Xc="}
注意点:
1.target_card_no,支付宝业务卡号,开卡接口中返回获取,开卡接口返回的值:"biz_card_no"对应该值
2.target_card_no_type,建议填写参数为BIZ_CARD
报错提供信息:
appid+接口名+调用接口时间,最好将本次请求的完整参数一并发过来
如果大家在测试过程中遇到问题欢迎在帖子下方追问,请按照标准方式提问