All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.fangxinqian.operator.sdk.identity.IdentityChkService Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package cn.fangxinqian.operator.sdk.identity;

import cn.fangxinqian.operator.sdk.constant.UrlConstant;
import cn.fangxinqian.operator.sdk.identity.dto.*;
import cn.fangxinqian.operator.sdk.identity.vo.CompanyInfoVO;
import cn.fangxinqian.operator.sdk.identity.vo.IdentityChkResultVO;
import cn.fangxinqian.operator.sdk.identity.vo.IdentityPoliceChkResultVO;
import cn.fangxinqian.operator.sdk.utils.OkHttp;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.io.IOException;

/**
 * @Author NieZhiLiang
 * @Email [email protected]
 * @GitHub https://github.com/niezhiliang
 * @Date 2019-10-09 2:09 下午
 */
public class IdentityChkService {

    /**
     * 公安部实名认证
     * @param policeChkDTO
     * @return
     * @throws IOException
     */
    public static IdentityPoliceChkResultVO policeChk(PoliceChkDTO policeChkDTO) throws IOException {

        String result = OkHttp.doPost(UrlConstant.IDENTITY_POLICE, JSON.toJSONString(policeChkDTO));
        return JSONObject.parseObject(result, IdentityPoliceChkResultVO.class);
    }

    /**
     * 手机三要素核验
     * @param phoneChkDTO
     * @return
     */
    public static IdentityChkResultVO phoneChk(PhoneChkDTO phoneChkDTO) throws IOException {

        String result = OkHttp.doPost(UrlConstant.IDENTITY_PHONE, JSON.toJSONString(phoneChkDTO));
        return JSONObject.parseObject(result, IdentityChkResultVO.class);
    }

    /**
     * 银行卡三要素
     * @param bankCard3ChkDTO
     * @return
     * @throws IOException
     */
    public static IdentityChkResultVO bankcard3Chk(BankCard3ChkDTO bankCard3ChkDTO) throws IOException {

        String result = OkHttp.doPost(UrlConstant.IDENTITY_BANKCARD3,JSON.toJSONString(bankCard3ChkDTO));
        return JSONObject.parseObject(result, IdentityChkResultVO.class);
    }

    /**
     * 银行卡四要素核验
     * @param bankCard4ChkDTO
     * @return
     * @throws IOException
     */
    public static IdentityChkResultVO bankcard4Chk(BankCard4ChkDTO bankCard4ChkDTO) throws IOException {

        String result = OkHttp.doPost(UrlConstant.IDENTITY_BANKCARD4,JSON.toJSONString(bankCard4ChkDTO));
        return JSONObject.parseObject(result, IdentityChkResultVO.class);
    }

    /**
     * 企业工商信息核验
     * @param companyInfoDTO
     * @return
     * @throws IOException
     */
    public static CompanyInfoVO queryCompanyInfo(CompanyInfoDTO companyInfoDTO) throws IOException {

        String result = OkHttp.doPost(UrlConstant.IDENTITY_COMPANY,JSON.toJSONString(companyInfoDTO));
        return JSONObject.parseObject(result, CompanyInfoVO.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy