金额转大写
最后更新于:2022-04-02 08:24:52
## 金额转大写
>[danger]### 会员接口,仅限会员使用,购买[API会员](https://market.topthink.com/product/210)
![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/ea/25/ea2582b9de9645da5fe98e3f3436ccb7_128x128.png)
> 将小写的阿拉伯数字转为中文大写或英文大写的金额数字,返回结果同时包含中英文大写金额并指定英文结尾的单位。注意,输入的金额为国内习惯,不能有逗号,且金额不得超过1万亿。
## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086))
### 请求地址
```
GET https://api.topthink.com/money/convert
```
### 请求参数
| 名称 | 必填 | 类型 | 说明 |
| --- | --- | --- | --- |
| appCode| 是| string|用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) |
| money| 是 | string | 金额阿拉伯数字|
### 返回`data`参数
| 名称 | 类型 | 示例值 | 说明 |
| --- | --- | --- | --- |
| cnresult | string | 陆拾陆万陆仟陆佰陆拾陆元陆角陆分 | 中文大写金额 |
| fnresult | string | 666,666.66 | 西式的三位分节法数字 |
| enresult | string | SIX HUNDRED SIXTY-SIX THOUSAND AND SIX HUNDRED SIXTY-SIX DOLLARS AND SIXTY-SIX CENTS ONLY | 英语大写金额 |
## SDK调用
```
$client = new Client("YourAppCode");
$result = $client->moneyConvert()
->withMoney('666666.66')
->request();
```
返回示例:
~~~
{
"code":0,
"message": "成功的返回",
"data": {
"cnresult":"陆拾陆万陆仟陆佰陆拾陆元陆角陆分",
"fnresult":"666,666.66",
"enresult":"SIX HUNDRED SIXTY-SIX THOUSAND AND SIX HUNDRED SIXTY-SIX DOLLARS AND SIXTY-SIX CENTS ONLY"
}
}
~~~
';