# 实人认证

# 配置依赖

支付宝支付依赖此ohpm包:@uni_modules/uni-facialrecognitionverify@1.0.2

oh-package.json5文件内dependencies字段下添加如下内容:

"@uni_modules/uni-facialrecognitionverify": "1.0.2"

# 注册模块

在uni_modules入口文件index.generated.ets内注册实人认证api。

import { registerUniProvider, uni } from "@dcloudio/uni-app-runtime";
import { startFacialRecognitionVerify, getFacialRecognitionMetaInfo } from '@uni_modules/uni-facialrecognitionverify'

export function initUniModules() {
  initUniExtApi();
}

function initUniExtApi() {
  uni.startFacialRecognitionVerify = startFacialRecognitionVerify
  uni.getFacialRecognitionMetaInfo = getFacialRecognitionMetaInfo
}