Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh_internal_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨培培
wxh_internal_api
Commits
3310bc16
Commit
3310bc16
authored
Nov 14, 2019
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增信息验证服务
parent
581fc0e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
Verify.php
src/ucenter/Verify.php
+68
-0
No files found.
src/ucenter/Verify.php
0 → 100644
View file @
3310bc16
<?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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment