Commit 3310bc16 authored by 杨培's avatar 杨培

新增信息验证服务

parent 581fc0e5
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2019/11/14
* Time: 18:24
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
/**
* 信息验证服务
* @package internalApi\ucenter
*/
class Verify extends Client
{
const INDEX_UID = 0;
const INDEX_MOBILE = 1;
const INDEX_WXHUID = 2;
/**
* 识别身份证信息
*
* @param string $idCardUrl
* @param string $type front or back
* @return array
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function identifyIdCard($idCardUrl, $type)
{
return self::call('verify.identifyIdCard', compact('idCardUrl', 'type'));
}
/**
* 验证支付宝账号有效性
*
* @param string $account 支付宝账号
* @param string $name 姓名
* @param int $memberIndex 关联用户索引
* @param int $id 关联用户值,如 $memberIndex 为 INDEX_UID 时,此值需指定用户中心 uid
* @return bool 识别成功返回 true,识别失败抛出异常
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function verifyAlipayAccount($account, $name, $memberIndex=self::INDEX_UID, $id=0)
{
return self::call('verify.verifyAlipayAccount', compact('account', 'name', 'memberIndex', 'id'));
}
/**
* 验证银行卡有效性
*
* @param string $cardNumber 银行卡号
* @param string $name 姓名
* @return bool 识别成功返回 true,识别失败抛出异常
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function verifyBankCard($cardNumber, $name)
{
return self::call('verify.verifyBankCard', compact('cardNumber', 'name'));
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment