FaceidClient.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /*
  3. * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. namespace TencentCloud\Faceid\V20180301;
  18. use TencentCloud\Common\AbstractClient;
  19. use TencentCloud\Common\Profile\ClientProfile;
  20. use TencentCloud\Common\Credential;
  21. use TencentCloud\Faceid\V20180301\Models as Models;
  22. /**
  23. * @method Models\BankCard2EVerificationResponse BankCard2EVerification(Models\BankCard2EVerificationRequest $req) 本接口用于校验姓名和银行卡号的真实性和一致性。
  24. * @method Models\BankCard4EVerificationResponse BankCard4EVerification(Models\BankCard4EVerificationRequest $req) 本接口用于输入银行卡号、姓名、开户证件号、开户手机号,校验信息的真实性和一致性。
  25. * @method Models\BankCardVerificationResponse BankCardVerification(Models\BankCardVerificationRequest $req) 本接口用于银行卡号、姓名、开户证件号信息的真实性和一致性。
  26. * @method Models\DetectAuthResponse DetectAuth(Models\DetectAuthRequest $req) 每次调用人脸核身SaaS化服务前,需先调用本接口获取BizToken,用来串联核身流程,在验证完成后,用于获取验证结果信息。
  27. * @method Models\GetActionSequenceResponse GetActionSequence(Models\GetActionSequenceRequest $req) 使用动作活体检测模式前,需调用本接口获取动作顺序。
  28. * @method Models\GetDetectInfoResponse GetDetectInfo(Models\GetDetectInfoRequest $req) 完成验证后,用BizToken调用本接口获取结果信息,BizToken生成后三天内(3\*24\*3,600秒)可多次拉取。
  29. * @method Models\GetLiveCodeResponse GetLiveCode(Models\GetLiveCodeRequest $req) 使用数字活体检测模式前,需调用本接口获取数字验证码。
  30. * @method Models\IdCardOCRVerificationResponse IdCardOCRVerification(Models\IdCardOCRVerificationRequest $req) 本接口用于校验姓名和身份证号的真实性和一致性,您可以通过输入姓名和身份证号或传入身份证人像面照片提供所需验证信息。
  31. * @method Models\IdCardVerificationResponse IdCardVerification(Models\IdCardVerificationRequest $req) 传入姓名和身份证号,校验两者的真实性和一致性。
  32. * @method Models\ImageRecognitionResponse ImageRecognition(Models\ImageRecognitionRequest $req) 传入照片和身份信息,判断该照片与公安权威库的证件照是否属于同一个人。
  33. * @method Models\LivenessResponse Liveness(Models\LivenessRequest $req) 活体检测
  34. * @method Models\LivenessCompareResponse LivenessCompare(Models\LivenessCompareRequest $req) 传入视频和照片,先判断视频中是否为真人,判断为真人后,再判断该视频中的人与上传照片是否属于同一个人。
  35. * @method Models\LivenessRecognitionResponse LivenessRecognition(Models\LivenessRecognitionRequest $req) 传入视频和身份信息,先判断视频中是否为真人,判断为真人后,再判断该视频中的人与公安权威库的证件照是否属于同一个人。
  36. * @method Models\MinorsVerificationResponse MinorsVerification(Models\MinorsVerificationRequest $req) 传入手机号或者姓名和身份证号,判断该信息是否已实名认证且年满18周岁。
  37. * @method Models\PhoneVerificationResponse PhoneVerification(Models\PhoneVerificationRequest $req) 本接口用于校验手机号、姓名和身份证号的真实性和一致性。
  38. */
  39. class FaceidClient extends AbstractClient
  40. {
  41. /**
  42. * @var string 产品默认域名
  43. */
  44. protected $endpoint = "faceid.tencentcloudapi.com";
  45. /**
  46. * @var string api版本号
  47. */
  48. protected $version = "2018-03-01";
  49. /**
  50. * CvmClient constructor.
  51. * @param Credential $credential 认证类实例
  52. * @param string $region 地域
  53. * @param ClientProfile $profile client配置
  54. */
  55. function __construct($credential, $region, $profile=null)
  56. {
  57. parent::__construct($this->endpoint, $this->version, $credential, $region, $profile);
  58. }
  59. public function returnResponse($action, $response)
  60. {
  61. $respClass = "TencentCloud"."\\".ucfirst("faceid")."\\"."V20180301\\Models"."\\".ucfirst($action)."Response";
  62. $obj = new $respClass();
  63. $obj->deserialize($response);
  64. return $obj;
  65. }
  66. }