|
1
|
|
|
<?php |
|
2
|
|
|
/* |
|
3
|
|
|
* This file is part of the wannanbigpig/alipay-sdk-php. |
|
4
|
|
|
* |
|
5
|
|
|
* (c) wannanbigpig <[email protected]> |
|
6
|
|
|
* |
|
7
|
|
|
* This source file is subject to the MIT license that is bundled |
|
8
|
|
|
* with this source code in the file LICENSE. |
|
9
|
|
|
*/ |
|
10
|
|
|
|
|
11
|
|
|
namespace EasyAlipay\BaseService\User; |
|
12
|
|
|
|
|
13
|
|
|
use EasyAlipay\Kernel\Support\Support; |
|
14
|
|
|
|
|
15
|
|
|
class Client extends Support |
|
16
|
|
|
{ |
|
17
|
|
|
/** |
|
18
|
|
|
* alipay.user.certify.open.initialize(身份认证初始化服务). |
|
19
|
|
|
* |
|
20
|
|
|
* @param array $params |
|
21
|
|
|
* |
|
22
|
|
|
* @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response |
|
23
|
|
|
* |
|
24
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException |
|
25
|
|
|
* @throws \GuzzleHttp\Exception\GuzzleException |
|
26
|
|
|
* @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException |
|
27
|
|
|
*/ |
|
28
|
|
|
public function certifyInitialize(array $params) |
|
29
|
|
|
{ |
|
30
|
|
|
$method = 'alipay.user.certify.open.initialize'; |
|
31
|
|
|
|
|
32
|
|
|
return $this->request($method, [ |
|
33
|
|
|
'biz_content' => $params, |
|
34
|
|
|
]); |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* alipay.user.certify.open.certify(身份认证开始认证). |
|
39
|
|
|
* |
|
40
|
|
|
* @param array $params |
|
41
|
|
|
* |
|
42
|
|
|
* @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response |
|
43
|
|
|
* |
|
44
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException |
|
45
|
|
|
* @throws \GuzzleHttp\Exception\GuzzleException |
|
46
|
|
|
* @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException |
|
47
|
|
|
*/ |
|
48
|
|
|
public function certifyStart(array $params) |
|
49
|
|
|
{ |
|
50
|
|
|
$method = 'alipay.user.certify.open.certify'; |
|
51
|
|
|
|
|
52
|
|
|
return $this->request($method, [ |
|
53
|
|
|
'biz_content' => $params, |
|
54
|
|
|
]); |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* alipay.user.certify.open.query(身份认证记录查询). |
|
59
|
|
|
* |
|
60
|
|
|
* @param string $certifyId |
|
61
|
|
|
* |
|
62
|
|
|
* @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response |
|
63
|
|
|
* |
|
64
|
|
|
* @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException |
|
65
|
|
|
* @throws \GuzzleHttp\Exception\GuzzleException |
|
66
|
|
|
* @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException |
|
67
|
|
|
*/ |
|
68
|
|
|
public function getCertifyStatus(string $certifyId) |
|
69
|
|
|
{ |
|
70
|
|
|
$method = 'alipay.user.certify.open.query'; |
|
71
|
|
|
|
|
72
|
|
|
return $this->request($method, [ |
|
73
|
|
|
'biz_content' => [ |
|
74
|
|
|
'certify_id' => $certifyId, |
|
75
|
|
|
], |
|
76
|
|
|
]); |
|
77
|
|
|
} |
|
78
|
|
|
} |
|
79
|
|
|
|