2017-07-24-开放平台
2017年07月24日 不结婚不知道事的繁琐,家里一堆事,休息一半个月,重新开始coding,本文主要用来 归纳老夫对wechat、qq、支付宝开放平台的一些理解。
扫描二维码网页授权
支付宝
欺诈信息验证
public static void main(String[] args) throws AlipayApiException {
String bizNo = null;
// 获取bizNo
AlipayClient alipayClient = new DefaultAlipayClient(ALI_URL,"2016080500171059",APP_PRIVATE_KEY,"json","GBK",ALIPAY_PUBLIC_KEY,"RSA2");
ZhimaCreditAntifraudVerifyRequest request = new ZhimaCreditAntifraudVerifyRequest();
request.setBizContent("{" +
"\"product_code\":\"w1010100000000002859\"," +
"\"transaction_id\":\"20161127233342279873762130192523\"," +
"\"cert_no\":\"120103199901015078\"," +
"\"cert_type\":\"IDENTITY_CARD\"," +
"\"name\":\"小明4444333\"," +
"\"mobile\":\"15339833812\"," +
" }");
ZhimaCreditAntifraudVerifyResponse response = alipayClient.execute(request);
if(response.isSuccess()){
System.out.println("调用成功");
System.out.println(response.getVerifyCode());
} else {
System.out.println("调用失败");
}
}
返回结果:
调用成功
[V_CN_NM_MA, V_PH_NM_MA_UM60D]
Process finished with exit code 0
注:https://openclub.alipay.com/read.php?tid=1448&fid=28 ⤧ Next post AnypointStudio初学 ⤧ Previous post 面试问题归纳