说明:
该接口用于会员卡更新信息,官方接口文档【会员卡更新】
开卡接口参考该贴:[url]https://openclub.alipay.com/read.php?tid=1628&fid=71[/url]
代码调用示例:
public static void card_update(){ AlipayClient alipayClient=alipayclient(); AlipayMarketingCardUpdateRequest request = new AlipayMarketingCardUpdateRequest(); request.setBizContent("{" + ////开卡接口返回的值:"biz_card_no" ""target_card_no":"test_moban0000090544"," + ""target_card_no_type":"BIZ_CARD"," + ""occur_time":"2018-01-31 16:12:12"," + ""card_info":{" + //开卡接口返回的值:"biz_card_no" ""biz_card_no":"test_moban0000090544"," + //开卡接口返回的值"external_card_no" ""external_card_no":"waibu_carhao"," + ""open_date":"2018-01-31 15:58:46"," + ""valid_date":"2050-02-20 21:20:46"," + ""level":"VIP3"," + ""point":"8808"," + ""balance":"111124.89"" + " }," + ""ext_info":"\\"\\""," + " "notify_messages":[{" + " "message_type":"POINT_UPDATE"," + ""change_reason":"由于你的消费"," + ""ext_info":"{}"" + " }]" + " }"); AlipayMarketingCardUpdateResponse 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_update_response":{"code":"10000","msg":"Success"},"sign":"PK9mGX8uy3xfwRKygPxPCuf62YQU5JrdY4yDSn5dRhRcjtcTlzm8Gzv1yhnNXOhyITDzY6O8+rwPpSUqrQXT3VvS6dkMvEnoXsT5uKefRKX9PuvwbttN5Vc7Me57aPX9dReiBji4HgBVMI22gcugZ8mBTuNIecYNAAxiVcZjUFQ="}
注意点:
1.我代码中都标注了,三点,看代码中的注释信息
报错提供信息:
appid+接口名+调用接口时间,最好将本次请求的完整参数一并发过来
如果大家在测试过程中遇到问题欢迎在帖子下方追问,请按照标准方式提问