说明:
该接口是通过API接口进行删除会员卡的操作流程,官方接口文档【会员卡删卡】
开卡接口请参考该贴:[url]https://openclub.alipay.com/read.php?tid=1628&fid=71[/url]
代码调用示例:
public static void Card_Delete(){ AlipayClient alipayClient=alipayclient(); AlipayMarketingCardDeleteRequest request = new AlipayMarketingCardDeleteRequest(); request.setBizContent("{" + //该值唯一性,必须每次请求都不一样 "\"out_serial_no\":\"201607260000000000000000001\"," + //支付宝业务卡号,开卡接口中返回获取,开卡接口返回的值:"biz_card_no"对应该值 "\"target_card_no\":\"test_moban0000090544\"," + //该值固定填写如下 "\"target_card_no_type\":\"BIZ_CARD\"," + //删卡原因 "\"reason_code\":\"USER_UNBUND\"" + " }"); AlipayMarketingCardDeleteResponse 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_delete_response":{"code":"10000","msg":"Success"},"sign":"PK9mGX8uy3xfwRKygPxPCuf62YQU5JrdY4yDSn5dRhRcjtcTlzm8Gzv1yhnNXOhyITDzY6O8+rwPpSUqrQXT3VvS6dkMvEnoXsT5uKefRKX9PuvwbttN5Vc7Me57aPX9dReiBji4HgBVMI22gcugZ8mBTuNIecYNAAxiVcZjUFQ="}
当返回该信息后,支付宝钱包内的会员卡将会消失,卡包-卡,里面没有这张卡了
注意点:
1.out_serial_no,该值唯一性,必须每次请求都不一样
2.target_card_no,支付宝业务卡号,开卡接口中返回获取,开卡接口返回的值:"biz_card_no"对应该值
3.target_card_no_type,该值固定填写如下BIZ_CARD
报错提供信息:
appid+接口名+调用接口时间,最好将本次请求的完整参数一并发过来
如果大家在测试过程中遇到问题欢迎在帖子下方追问,请按照标准方式提问