﻿## 一、方案介绍
 「看一下支付」，是面向下一代个人智能设备的支付方式，看一下、说一声就能完成支付，解放双手高效更便捷。

未来也会结合支付宝的底层数据和核身能力，为眼镜厂商提供更多的支付宝端内服务，丰富AI眼镜的智能生态。

![](https://intranetproxy.alipay.com/skylark/lark/0/2025/png/11743/1756690642211-c57a9586-2b31-4e2c-96dc-10cf4c5b1606.png)



C端眼镜交互

![](https://intranetproxy.alipay.com/skylark/lark/0/2025/png/11743/1756267910651-f5676efe-660f-477d-a248-7cac81180a05.png)



## 二、接入准备
### 厂商关键词配置
| **场景** | **厂商唤醒关键词** | **示例** |
| --- | --- | --- |
| 缴话费 | <font style="color:rgb(15, 17, 21);">交话费、充话费、缴话费、手机充值、电话充值</font><br/><font style="color:#000000;">金额结合型（用户意图明确）</font><br/>+ <font style="color:#000000;">【动词】+【话费/元】：充50话费、交100元、充200块话费</font> | 帮我充值、帮我交话费、帮我手机充值50元、<br/>帮我交50元话费、我要充50元话费 |
| 停车缴费 | XX 停车缴费、XX停车费、<br/>给【XX车牌号】交下停车费、停车费怎么交？ | 乐奇，停车缴费、帮我停车缴费、启动停车缴费<br/>小爱同学，停车缴费、给我交停车费<br/>交一下停车费、付停车费、给这辆车交下停车费<br/>浙A28372交停车费 |
| 点咖啡 | 点一杯、来一杯、我要点、点杯、来杯** +** 咖啡名（奥瑞白、杨枝甘露、鲜萃、美式、拿铁、咖啡）/瑞幸<br/>新增：推荐一杯好喝的、推荐一杯、推荐新品 | 帮我点杯咖啡、帮我点一杯瑞幸咖啡、点一杯瑞幸咖啡、来一杯瑞幸咖啡、来一杯咖啡、我要点咖啡、点杯咖啡、请帮我点⼀杯柠C美式、来一杯 XXXX 咖啡、点一杯XXXX咖啡、<font style="color:rgb(23, 26, 29);">来杯精萃澳瑞白、点一杯生椰杨枝甘露、</font><font style="color:rgb(23, 26, 29);">点杯鲜萃轻轻茉莉</font> |
| 看一下支付 | 扫码支付、扫码支付XX元<br/>支付XX元、支付宝支付<br/>看一下支付、看一下支付XX元、<br/>帮我支付、帮我支付XX元、<br/>句式：XX  +支付、支付+xx元 | 扫码支付、扫码支付10元、支付10元、<br/>看一下支付10元、我要支付、我要支付10元 |
| 看一下货柜 | 1、扫码、扫二维码、扫描、扫条形码+ 开门、开柜、取货、开启<br/>2、货柜、支付宝+开门、开柜、取货、开启 | 扫码开门、支付宝开门、货柜开门<br/> |




### 整体架构
![](https://intranetproxy.alipay.com/skylark/lark/0/2025/png/11743/1756276115526-158c59e4-6fe8-40fc-a410-44e96b03551e.png)

+ 支付宝眼镜端和手机端统一成一个SDK（眼镜SDK）对外输出，整合安全、核身、AI交互等能力；
    - 提供意图识别、语音交互、视觉交互等AI能力；
    - 核心模块包含音视频采集、端侧AI、音视频编码等；
    - 依赖多模态ClientSDK传输数据；
+ 支付宝眼镜端sdk和手支付宝机端apk建立信令通道，不依赖于厂商中转；
+ 建立数据通道，用户音视频数据传输;
+ AI服务 与 安全/核身/眼镜等服务 云端打通，避免频繁端云交互；



### 技术框架
![](https://intranetproxy.alipay.com/skylark/lark/0/2025/png/11743/1756353297711-c4f1d6c2-af15-4ffd-9062-047679ff8238.png)



## 三、技术接入
### 1、眼镜APK
安装到眼镜端，主要处理支付宝业务逻辑和发起支付

需要Android敏感权限，**<u>需要厂商默认授予</u>**

```xml
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
```

| **<font style="color:rgb(0, 0, 0);">权限</font>** | **<font style="color:rgb(0, 0, 0);">描述</font>** | **<font style="color:rgb(0, 0, 0);">调用方</font>** | **<font style="color:rgb(0, 0, 0);">备注</font>** |
| :--- | :--- | :--- | :--- |
| <font style="color:rgb(0, 0, 0);">FOREGROUND_SERVICE、POST_NOTIFICATIONS</font> | <font style="color:rgb(0, 0, 0);">应用运行前台服务，防止被杀，并通知用户</font> | <font style="color:rgb(0, 0, 0);">眼镜端</font> | <font style="color:rgb(0, 0, 0);">眼镜端glassApp使用，手机端无</font> |
| <font style="color:rgb(0, 0, 0);">READ_PRIVILEGED_PHONE_STATE， READ_PHONE_STATE</font> | <font style="color:rgb(0, 0, 0);">访问手机状态信息</font> | <font style="color:rgb(0, 0, 0);">眼镜端</font> | <font style="color:rgb(0, 0, 0);">如获取deviceId</font> |
| <font style="color:rgb(0, 0, 0);">WRITE_SECURE_SETTINGS</font> | <font style="color:rgb(0, 0, 0);">写安全配置</font> | <font style="color:rgb(0, 0, 0);">眼镜端</font> | |
| <font style="color:rgb(0, 0, 0);">READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE, MANAGE_EXTERNAL_STORAGE</font> | <font style="color:rgb(0, 0, 0);">读写sdcard权限</font> | <font style="color:rgb(0, 0, 0);">眼镜端、手机端</font> | |
| <font style="color:rgb(0, 0, 0);">CAMERA</font> | <font style="color:rgb(0, 0, 0);">访问相机权限，扫码使用</font> | <font style="color:rgb(0, 0, 0);">眼镜端</font> | |
| <font style="color:rgb(0, 0, 0);">ACCESS_NETWORK_STATE，ACCESS_WIFI_STATE</font> | <font style="color:rgb(0, 0, 0);">访问网络状态</font> | <font style="color:rgb(0, 0, 0);">手机端或有网眼镜</font> | |
| <font style="color:rgb(0, 0, 0);">QUERY_ALL_PACKAGES</font> | <font style="color:rgb(0, 0, 0);">查询包信息，配合query包名使用</font> | <font style="color:rgb(0, 0, 0);">眼镜端</font> | <font style="color:rgb(0, 0, 0);">眼镜端glassApp用</font> |
| <font style="color:rgb(0, 0, 0);">BLUETOOTH</font> | <font style="color:rgb(0, 0, 0);">扫描蓝牙设备</font> | <font style="color:rgb(0, 0, 0);">眼镜端</font> | |
| <font style="color:rgb(0, 0, 0);">ACCESS_THREAT_DETECTION</font> | <font style="color:rgb(64, 64, 64);">访问设备的威胁检测服务</font> | <font style="color:rgb(0, 0, 0);">眼镜端</font> | |
| <font style="color:rgb(0, 0, 0);">VIBRATE</font> | <font style="color:rgb(64, 64, 64);">控制设备的振动器</font> | <font style="color:rgb(0, 0, 0);">手机端</font> | |


### 2、眼镜端SDK
厂商系统集成眼镜端SDK，作为中间件串联手机端和眼镜Apk，主要用以眼镜系统侧与眼镜APK的AIDL通信，主要接口类：**<u>AlipayGlassV3Sdk</u>**

```java
AlipayGlassV3Sdk.getInstance(this).initSDK(extParams, new GlassSDKCallback() {
    //开启录音，开启后需要在手机端回传音频数据到 receiveDenoiseAudio
    @Override
    public void onStartRecording(String token) {
        //startRecordAudio(true);
    }

    //停止录音，停止后手机端不在回调
    @Override
    public void onStopRecording() {
        //startRecordAudio(false);
    }

    @Override
    public String onStartPlayback(String ttsData) {
        return null;
    }

    //在这里发送蓝牙数据
    @Override
    public int sendDeviceLinkAsync(String data) {
        return 0;
    }

    @Override
    public boolean onWearDetection() {
        return true;
    }

    @Override
    public void onErrorEvent(String code, String message) {
        //错误回调
    }

    @Override
    public void onViIntentResult(String bizType, String dataJson, Map<String, Object> extInfo) {
        //意图回调
    }
});
```

```java
AlipayGlassV3Sdk.getInstance(this).onGateDataReceived(message);
```

<font style="color:rgb(0, 0, 0);">初始化SDK，进程启动在眼镜App建立连接时调用，会将参数传递给眼睛初始化glassApp，支持重复调用；</font>

<font style="color:rgb(0, 0, 0);">入参：（入参key详见GlasspayConfig.java中定义）</font>

| **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">参数key</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">类型</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">含义</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">是否必填</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">备注</font>** |
| :--- | :--- | :--- | :--- | :--- |
| <font style="color:rgb(0, 0, 0);">isvName</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">厂商名称</font> | <font style="color:rgb(0, 0, 0);">是</font> | |
| <font style="color:rgb(0, 0, 0);">deviceModel</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">设备机型</font> | <font style="color:rgb(0, 0, 0);">是</font> | |
| <font style="color:rgb(0, 0, 0);">deviceSN</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">设备SN</font> | <font style="color:rgb(0, 0, 0);">是</font> | |
| <font style="color:rgb(0, 0, 0);">glassSupportNetwork</font> | <font style="color:rgb(0, 0, 0);">boolean</font> | <font style="color:rgb(0, 0, 0);">眼镜是否支持联网</font> | <font style="color:rgb(0, 0, 0);">是</font> | |
| <font style="color:rgb(0, 0, 0);">phoneSysType</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">用户手机型号</font> | <font style="color:rgb(0, 0, 0);">否</font> | |
| <font style="color:rgb(0, 0, 0);">glassPayConfig</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">glassSDK的配置json</font> | <font style="color:rgb(0, 0, 0);">否</font> | |


收到手机端消息回传给SDK

### 3、手机端SDK
Android端，主要接口类：**<u>AlipayGlassV2SDK</u>**

iOS端，主要接口类：**<u>AlipayGlassSDK.h</u>**

#### 3.1 初始化
```java
private AwaitTaskManager awaitTaskManager = new AwaitTaskManager();

AlipayGlassV3Sdk.getInstance(this).initSDK(extParams, new GlassSDKCallback() {

    @Override
    public void onStartRecording(String token) {}

    @Override
    public void onStopRecording() {}

    //播放TTS
    @Override
    public String onStartPlayback(String ttsData) {
        return null;
    }

    @Override
    public DeviceResponseData sendDeviceLink(DeviceRequireData data) {
        return null;
    }

    //发送数据到蓝牙通道
    @Override
    public int sendDeviceLinkAsync(String data) {
        return 0;
    }

    @Override
    public boolean onWearDetection() {
        return true;
    }

    @Override
    public void onErrorEvent(String code, String message) {
        // ● onErrorEvent：
        //   ○ Q1010/1011:sdk调用initCloudEnv失败，或者wss建联失败；收到此错误码仅需播音提示用户。
        //   ○ Q9990:glassSDK已释放退出
    }

    @Override
    public void onViIntentResult(String bizType, String dataJson, Map<String, Object> extInfo) {}
});
```

| **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">参数key</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">类型</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">含义</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">是否必填</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">备注</font>** |
| :--- | :--- | :--- | :--- | --- |
| <font style="color:rgb(0, 0, 0);">isvName</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">厂商名称</font> | <font style="color:rgb(0, 0, 0);">是</font> | 传"meizu" |
| <font style="color:rgb(0, 0, 0);">deviceModel</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">设备机型</font> | <font style="color:rgb(0, 0, 0);">是</font> | |
| <font style="color:rgb(0, 0, 0);">deviceSN</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">设备SN</font> | <font style="color:rgb(0, 0, 0);">是</font> | |
| <font style="color:rgb(0, 0, 0);">glassSupportNetwork</font> | <font style="color:rgb(0, 0, 0);">boolean</font> | <font style="color:rgb(0, 0, 0);">眼镜是否支持联网</font> | <font style="color:rgb(0, 0, 0);">是</font> | |
| <font style="color:rgb(0, 0, 0);">phoneSysType</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">用户手机型号</font> | <font style="color:rgb(0, 0, 0);">否</font> | |
| <font style="color:rgb(0, 0, 0);">glassPayConfig</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">glassSDK的配置json</font> | <font style="color:rgb(0, 0, 0);">否</font> | |


#### <font style="color:rgb(0, 0, 0);">3.2 getBindStatus</font>
<font style="color:rgb(0, 0, 0);">获取眼镜的绑定状态；在手机端展示绑定状态 或者每次发起支付前调用；若未绑定，提示用户去厂商App中进行绑定；</font>

+ <font style="color:rgb(0, 0, 0);">needCloudStatus=true, 查询云端状态，一般填true;</font>
+ <font style="color:rgb(0, 0, 0);">needCloudStatus=false, 查询本地缓存状态；</font>

#### <font style="color:rgb(0, 0, 0);">3.3 startBinding</font>
```java
AlipayGlassV2Sdk.startBinding(map, new BindingCallBack() {
    @Override
    public void onGetBindingSchemeSuccess(String bindingScheme, String token) {
        //收到支付宝绑定页面，跳转scheme
    }

    @Override
    public void onBindingSuccess() {
        //绑定完成
    }

    @Override
    public void onBindingFailed(String errorCode) {
        //绑定失败
    }

    @Override
    public String getReturnUrl() {
        return "";//可忽略，在入参map中传入
    }

    @Override
    public Map<String, Object> onGetBindExtInfo(Map<String, Object> extInfo1, String extInfo2) {
        return Collections.emptyMap();
    }
});
```

<font style="color:rgb(0, 0, 0);">开始绑定，用户点击手机上的【开始绑定】按钮时调用；</font>

<font style="color:rgb(0, 0, 0);">入参：(详见GlasspayConfig.java中定义）</font>

| **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">参数key</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">类型</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">含义</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">是否必填</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">备注</font>** |
| :--- | :--- | :--- | :--- | :--- |
| <font style="color:rgb(0, 0, 0);">returnUrl</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">绑定完成后的回跳地址</font> | <font style="color:rgb(0, 0, 0);">否</font> | <font style="color:rgb(0, 0, 0);">优先级高于callback中的getReturnUrl</font> |


**<font style="color:rgb(0, 0, 0);">onGetBindExtInfo extInfo1返回参数：</font>**

| **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">参数key</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">类型</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">含义</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">返回时机</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">备注</font>** |
| :--- | :--- | :--- | :--- | :--- |
| <font style="color:rgb(0, 0, 0);">AlipayAppDownloadUrl</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">支付宝App下载地址</font> | <font style="color:rgb(0, 0, 0);">返回bindingschema时</font> | <font style="color:rgb(0, 0, 0);">绑定时，若用户手机未安装支付宝，则提示其下载安装</font> |


#### <font style="color:rgb(0, 0, 0);">3.4 receiveDenoiseAudio</font>
<font style="color:rgb(0, 0, 0);">接受降噪音频传入，格式要求：pcm，单声道，16000采样率，16位深(AV_SAMPLE_FMT_S16)；</font>

+ <font style="color:rgb(0, 0, 0);">绑定阶段：当进入支付宝小程序读文案界面时，会回调onStartRecord，此时打开麦克风，上传音频；</font>
+ <font style="color:rgb(0, 0, 0);">支付阶段：识别支付意图时，调用scanpay接口，同时将用户这句话也调用receiveDenoiseAudio传入；</font>

##### <font style="color:rgb(0, 0, 0);">唤起语上传</font>
<font style="color:rgb(0, 0, 0);">唤起语料厂商先做缓存，当识别到支付意愿调用scanpay接口时，同时把唤起语音进行上传；在扩展字段中填写</font>

<font style="color:rgb(0, 0, 0);">extParams.put("flowNode", "AROUSE");</font>

<font style="color:rgb(0, 0, 0);"></font>

#### 3.5 unbind
解绑支付宝账号

#### 3.6 sendDeviceLinkAsync
通过蓝牙通道发送数据

#### 3.7 onGateDataReceived 
蓝牙通道收到数据后回传给SDK即可

#### 3.8 scanpay
<font style="color:rgb(0, 0, 0);">调用开始扫码支付；当识别到用户支付意图时，调用；调用前请先检查绑定状态。</font>

<font style="color:rgb(0, 0, 0);">入参：(详见GlasspayConfig.java中定义）</font>

| **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">参数key</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">类型</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">含义</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">是否必填</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">备注</font>** |
| :--- | :--- | :--- | :--- | :--- |
| <font style="color:rgb(0, 0, 0);">USE_DEMO_MODE</font> | <font style="color:rgb(0, 0, 0);">bool</font> | <font style="color:rgb(0, 0, 0);">是否启用演示模式</font> | <font style="color:rgb(0, 0, 0);">否</font> | <font style="color:rgb(0, 0, 0);">仅对单笔看码付有效</font> |
| <font style="color:rgb(0, 0, 0);">disableTransparent</font> | <font style="color:rgb(0, 0, 0);">bool</font> | <font style="color:rgb(0, 0, 0);">是否打开扫码预览</font> | <font style="color:rgb(0, 0, 0);">否</font> | |
| <font style="color:rgb(0, 0, 0);">PAY_INIT_ASR</font><font style="color:rgb(0, 0, 0);"> </font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">唤起语文本传入</font> | <font style="color:rgb(0, 0, 0);">否</font> | <font style="color:rgb(0, 0, 0);">sdk收到后放入initCloudEnv请求中,返回extInfo里面加个PAY_INIT_ASR_INTENTION; 设备通信用initIntentData</font> |


#### <font style="color:rgb(0, 0, 0);">3.9 command</font>
<font style="color:rgb(0, 0, 0);">发送指令，比如用户点击眼镜的返回按键、摘下眼镜等时机调用；</font>

<font style="color:rgb(0, 0, 0);">入参：(详见GlasspayConfig.java中定义）</font>

| **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">参数key</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">类型</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">含义</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">是否必填</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">备注</font>** |
| :--- | :--- | :--- | :--- | :--- |
| <font style="color:rgb(0, 0, 0);">commandCode</font> | <font style="color:rgb(0, 0, 0);">int</font> | <font style="color:rgb(0, 0, 0);">指令编码</font> | <font style="color:rgb(0, 0, 0);">是</font> | <font style="color:rgb(0, 0, 0);">0:表示退出</font><br/><font style="color:rgb(0, 0, 0);">1：表示按键命令</font> |
| <font style="color:rgb(0, 0, 0);">keyCode</font> | <font style="color:rgb(0, 0, 0);">int</font> | <font style="color:rgb(0, 0, 0);">具体按键值</font> | <font style="color:rgb(0, 0, 0);">否</font> | |
| <font style="color:rgb(0, 0, 0);">source</font> | <font style="color:rgb(0, 0, 0);">String</font> | <font style="color:rgb(0, 0, 0);">命令来源</font> | <font style="color:rgb(0, 0, 0);">否</font> | <font style="color:rgb(0, 0, 0);">GlassAppDisconnect:眼镜端glassApp断开连接</font> |


<font style="color:rgb(0, 0, 0);">当摘掉眼镜时，退出支付流程</font>

```java
params.put(GlasspayConfig.KEY_COMMAND_CODE, GlasspayConfig.CommandCode.EXIT);
params.put("source", "GlassAppDisconnect");
AlipayGlassV2Sdk.command(params);
```

### 错误码
| **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">错误码</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">错误描述</font>** | **<font style="color:rgb(0, 0, 0);background-color:rgb(29, 192, 201);">解决方案</font>** |
| :--- | :--- | :--- |
| <font style="color:rgb(0, 0, 0);">1001</font> | <font style="color:rgb(0, 0, 0);">扫码超时</font> | <font style="color:rgb(0, 0, 0);">检查二维码是否破损并重试</font> |
| <font style="color:rgb(0, 0, 0);">1002</font> | <font style="color:rgb(0, 0, 0);">摄像头异常</font> | <font style="color:rgb(0, 0, 0);">重启设备，检查摄像头是否正常</font> |
| <font style="color:rgb(0, 0, 0);">1003</font> | <font style="color:rgb(0, 0, 0);">网络异常</font> | <font style="color:rgb(0, 0, 0);">检查网络是否正常</font> |
| <font style="color:rgb(0, 0, 0);">1004</font> | <font style="color:rgb(0, 0, 0);">系统繁忙</font> | <font style="color:rgb(0, 0, 0);">1、绑定失败重试超过100次；</font><br/><font style="color:rgb(0, 0, 0);">2、码路由信息解析异常</font> |
| <font style="color:rgb(0, 0, 0);">1005</font> | <font style="color:rgb(0, 0, 0);">用户取消扫码</font> | <font style="color:rgb(0, 0, 0);">用户主动关闭，无需处理</font> |
| <font style="color:rgb(0, 0, 0);">1006</font><font style="color:rgb(0, 0, 0);"> </font> | <font style="color:rgb(0, 0, 0);">暂不支持扫描的码</font> | <font style="color:rgb(0, 0, 0);">更换支持的支付宝收款码、经营码等</font> |
| <font style="color:rgb(0, 0, 0);">1007</font> | <font style="color:rgb(0, 0, 0);">手机端解绑</font> | <font style="color:rgb(0, 0, 0);">重新绑定设备</font> |
| <font style="color:rgb(0, 0, 0);">4000</font> | <font style="color:rgb(0, 0, 0);">1、系统繁忙，请稍后再试</font><br/><font style="color:rgb(0, 0, 0);">2、手机端解绑</font><br/><font style="color:rgb(0, 0, 0);">3、付款功能关闭</font><br/><font style="color:rgb(0, 0, 0);">4、支付超出限额</font> | <font style="color:rgb(0, 0, 0);">根据errorMessage具体处理</font> |
| <font style="color:rgb(0, 0, 0);">8000</font> | <font style="color:rgb(0, 0, 0);">支付结果未知，请与商家确认</font> | <font style="color:rgb(0, 0, 0);">联系商户确认支付结果</font> |
| <font style="color:rgb(0, 0, 0);">9000</font> | <font style="color:rgb(0, 0, 0);">支付成功</font> | <font style="color:rgb(0, 0, 0);">无需处理</font> |


```java
//客户端本地错误码：1000~1999,
Q1001("扫码超时", "检查二维码是否破损并重试"),
Q1002("摄像头异常", "重启设备，检查摄像头是否正常"),
Q1003("网络异常", "检查网络是否正常"),
Q1004("系统繁忙", "绑定失败重试超过100次/码路由信息解析异常"),
Q1005("用户取消扫码", "用户主动关闭，无需处理"),
Q1006("无效二维码，请扫描支付宝收款码", "更换支持的支付宝收款码、经营码等"),
Q1007("请在手机app中绑定支付宝账号", "重新绑定设备"),
Q1010("支付失败", "wss建联失败或者initCloud返回null"),
Q1011("绑定失败", "wss建联失败或者initCloud返回null"),
Q1012("支付APP已断开", "眼镜端glassApp已断开，手机端sdk进行释放重置，请稍后再重试"),

//服务端错误码：4000~4999：ret_def.h， 基础上+4000；--https://yuque.antfin.com/pqpil5/kiedbk/hlhuf5xw4o83gs70
Q4000("系统繁忙,请稍后再试", "通用错误提示"),
Q4058("支付账号已解绑，请重新绑定", "PAY_RESULT_ALREADY_UNBIND"),
Q4059("请在手机端打开付款功能", "PAY_RESULT_PAYMENT_CLOSED"),
Q4060("支付超出限额，请用手机支付宝付款", "PAY_RESULT_EXCEED_LIMIT"),
Q4061("无效二维码，请扫描支付宝收款码", "PAY_RESULT_UNSUPPORT_CODE"),
Q4062("资金不⾜，⽀付失败", "PAY_RESULT_BALANCE_NOT_ENOUGH"),
Q4093("支付异常，请在手机端支付", "PAY_RESULT_FAIL"),

Q8000("支付结果未知，请和商家确认", "联系商户确认支付结果"),
```



## 接入前需要准备好的资源

:::aipay-alert{type="warning" message=""}
1. **需要收集厂商眼镜端集成SDK的应用签名md5和包名，做签名校验**
    1. **Android拿到蓝盾签名图片后，放到对应的工程中的app主模块下的assets根目录下即可**
    2. **iOS需要放在mainBundle里，图片名称需要为nearx_bs.jpg**
2. **另需搜集眼睛端对接SDK的应用 sha265，用于IPC调用安全校验**  ![](https://intranetproxy.alipay.com/skylark/lark/0/2025/png/185656632/1756194675676-0b7350bd-6777-42cd-987b-5c6062f1ff57.png)
3. **支付宝网关侧对接入厂商需要配置appId，接入前需要做好配置，傲凌\莫程**
4. **搜集眼镜型号（model），否则绑定阶段小程序无法跳转**
:::