## 支付文檔
# [](https://github.com/alipay/alipay-easysdk/blob/master/APIDoc.md#%E8%BE%85%E5%8A%A9%E5%B7%A5%E5%85%B7-util)輔助工具 Util
## [](https://github.com/alipay/alipay-easysdk/blob/master/APIDoc.md#%E5%8A%A0%E8%A7%A3%E5%AF%86-aes)加解密 AES
### [](https://github.com/alipay/alipay-easysdk/blob/master/APIDoc.md#aes%E8%A7%A3%E5%AF%86%E5%B8%B8%E7%94%A8%E4%BA%8E%E4%BC%9A%E5%91%98%E6%89%8B%E6%9C%BA%E5%8F%B7%E8%A7%A3%E5%AF%86)AES解密(常用于會員手機號解密)
* API聲明
decrypt(cipherText: string)
* 入參說明
| 字段名 | 類型 | 必填 | 說明 |
| --- | --- | --- | --- |
| cipherText | string | 是 | 密文 |
* 出參說明
| 類型 | 說明 |
| --- | --- |
| string | 明文 |
### [](https://github.com/alipay/alipay-easysdk/blob/master/APIDoc.md#aes%E5%8A%A0%E5%AF%86)AES加密
* API聲明
encrypt(plainText: string)
* 入參說明
| 字段名 | 類型 | 必填 | 說明 |
| --- | --- | --- | --- |
| plainText | string | 是 | 明文 |
* 出參說明
| 類型 | 說明 |
| --- | --- |
| string | 密文 |
## [](https://github.com/alipay/alipay-easysdk/blob/master/APIDoc.md#%E9%80%9A%E7%94%A8%E6%8E%A5%E5%8F%A3-generic)通用接口 Generic
### [](https://github.com/alipay/alipay-easysdk/blob/master/APIDoc.md#%E6%89%A7%E8%A1%8Copenapi%E8%B0%83%E7%94%A8)執行OpenAPI調用
* API聲明
execute(method: string, textParams: map\[string\]string, bizParams: map\[string\]any): AlipayOpenApiGenericResponse
* 接口說明
對于Alipay Easy SDK尚未支持的Open API,開發者可以通過調用此方法,通過自行拼裝請求參數,完成幾乎所有OpenAPI的調用,且調用時可按需設置所有可選參數。本接口同樣會自動為您完成請求的加簽和響應的驗簽工作。
* 入參說明
| 字段名 | 類型 | 必填 | 說明 |
| --- | --- | --- | --- |
| method | string | 是 | OpenAPI的名稱,例如:alipay.trade.pay |
| textParams | map\[string\]string | 否 | **沒有**包裝在`biz_content`下的請求參數集合,例如`app_auth_token`等參數 |
| bizParams | map\[string\]any | 否 | 被包裝在`biz_content`下的請求參數集合 |
* 出參說明
| 字段名 | 類型 | 必填 | 說明 |
| --- | --- | --- | --- |
| httpBody | string | 是 | 網關返回的HTTP響應,是一個JSON格式的字符串,開發者可按需從中解析出響應參數,響應示例:{"alipay\_trade\_create\_response":{"code":"10000","msg":"Success","out\_trade\_no":"4ac9eac...","trade\_no":"202003..."},"sign":"AUumfYgGSe7...02MA=="} |
| code | string | 是 | [網關返回碼](https://docs.open.alipay.com/common/105806) |
| msg | string | 是 | [網關返回碼描述](https://docs.open.alipay.com/common/105806) |
| subCode | string | 否 | 業務返回碼,參見具體的API接口文檔 |
| subMsg | string | 否 | 業務返回碼描述,參見具體的API接口文檔 |