【芝麻信用对接】欺诈信息验证

(28) 2024-03-20 18:01:01

芝麻信用地址:

https://b.zmxy.com.cn/technology/openDoc.htm?relInfo=zhima.credit.antifraud.verify@1.0@1.1

优点:

不需要用户授权,有姓名,身份证号码就可以查询下是否匹配,

【芝麻信用对接】欺诈信息验证 (https://mushiming.com/)  第1张

还可以验证手机号,银行的要素验证。

下面测试的时候,只用最简单的姓名,身份证。

官方demo:

import com.antgroup.zmxy.openplatform.api.DefaultZhimaClient;
import com.antgroup.zmxy.openplatform.api.FileItem;
import com.antgroup.zmxy.openplatform.api.ZhimaApiException;
import com.antgroup.zmxy.openplatform.api.request.ZhimaCreditAntifraudVerifyRequest;
import com.antgroup.zmxy.openplatform.api.response.ZhimaCreditAntifraudVerifyResponse;

public class TestZhimaCreditAntifraudVerify {
    //芝麻开放平台地址
    private String gatewayUrl     = "https://zmopenapi.zmxy.com.cn/openapi.do";
    //商户应用 Id
    private String appId          = "***";
    //商户 RSA 私钥
    private String privateKey     = "***";
    //芝麻 RSA 公钥
    private String zhimaPublicKey = "***";

    public void  testZhimaCreditAntifraudVerify() {
        ZhimaCreditAntifraudVerifyRequest req = new ZhimaCreditAntifraudVerifyRequest();
        req.setChannel("apppc");
        req.setPlatform("zmop");
        req.setProductCode("w1010100000000002859");// 必要参数 
        req.setTransactionId("20151127233347987676212309253");// 必要参数 
        req.setCertNo("640202199007164686");// 必要参数 
        req.setCertType("IDENTITY_CARD");// 必要参数 
        req.setName("牛德华");// 必要参数 
        req.setMobile("15843991158");// 
        req.setEmail("jnlxhy@alitest.com");// 
        req.setBankCard("20110602436748024138");// 
        req.setAddress("杭州市西湖区天目山路266号");// 
        req.setIp("101.247.161.1");// 
        req.setMac("44-45-53-54-00-00");// 
        req.setWifimac("00-00-00-00-00-E0");// 
        req.setImei("868331011992179");// 
        DefaultZhimaClient client = new DefaultZhimaClient(gatewayUrl, appId, privateKey, zhimaPublicKey);
        try {
            ZhimaCreditAntifraudVerifyResponse response = client.execute(req);
            System.out.println(response.isSuccess());
            System.out.println(response.getErrorCode());
            System.out.println(response.getErrorMessage());
        } catch (ZhimaApiException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        TestZhimaCreditAntifraudVerify result = new  TestZhimaCreditAntifraudVerify();
        result.testZhimaCreditAntifraudVerify();
    }
}

实际测试的时候。可以根据业务来选择。

【芝麻信用对接】欺诈信息验证 (https://mushiming.com/)  第2张

测试500条,大概跑了3分钟,每秒不到3条吧,速度还行。数据还是需要验证的

【芝麻信用对接】欺诈信息验证 (https://mushiming.com/)  第3张

THE END

发表回复