-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
81 additions
and
34 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,63 @@ | ||
First Header | Second Header | Third Header | ||
------------ | ------------- | ------------ | ||
Content Cell | Content Cell | Content Cell | ||
Content Cell | Content Cell | Content Cell | ||
# 基本 | ||
|
||
#### 简介 | ||
1. 介绍 | ||
2. API设置 | ||
3. 认证方式 | ||
4. API响应 | ||
#### 接受付款 | ||
#### 使用API接受付款 | ||
#### 示例代码 | ||
|
||
# 付款 | ||
|
||
#### 创建交易 | ||
|
||
> 系统把创建交易的能力以API的形式开放给商家,使您能用更灵活的方式集成开发支付功能。此API用于创建商家自己的自定义结帐页面,因此买家不必离开商家的网站即可完成付款。 | ||
| 接口说明 | | | ||
| ------------ | ------------ | | ||
| 请求路径 | http://{host}/api/v1/submit_trans | | ||
| 请求方式 | POST | | ||
| Content-Type | application/json | | ||
| 字符编码 | UTF-8 | | ||
|
||
请求参数说明 | ||
|
||
| 参数 | 类型 | 备注 | | ||
| ------------ | ------------ | ------------ | | ||
| sign | string | 签名 | | ||
| pubkey | string | 系统分配的公钥 | | ||
| item_name | string | (可选)此交易的商品名 | | ||
| state | string | (可选)此交易的code码,该code码将在回调时通知给商家,用于商家识别订单 | | ||
|
||
响应参数说明 | ||
|
||
| 参数 | 类型 | 备注 | | ||
| ------------ | ------------ | ------------ | | ||
| status | integer | 系统状态码,=0为操作成功,>0为操作失败,msg有相关错误说明 | | ||
| msg | string | 当status>0时,错误说明信息(该字段在status=0时返回交易TXID)| | ||
| data | object | 交易实体对象 | | ||
| expired_at | datetime | 交易过期时间,过期后订单结束,不再回调通知 | | ||
|
||
请求示例 | ||
|
||
``` | ||
{ | ||
"sign": "42306036e6345609e5c4edd6bc830c4bfc9575d306a4d2950d3611e29ee798267953f010cba0f7471842c0f27e83e59018ea01c345f82be07c3e5f148c822dbc", | ||
"pubkey": "0b6dbe660366b5a8b3ccbfeec373eeec1567b89a96fe0c5ef502091cc8249c42", | ||
"item_name": "手机", | ||
"state": "1001" | ||
} | ||
``` | ||
|
||
#### 查询交易 | ||
|
||
> 查询交易能力开放是为了商家更好的控制自己的自定义结帐页面,前端可以采取轮询的方式请求此接口,以获得订单实时状态。也可以通过此接口获取到的过期时间设置定时器,定时关闭订单以达到控制交易的效果。 | ||
#### 回调地址 | ||
|
||
|
||
1. {host}地址 | ||
- 测试环境: | ||
- 正式环境: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sphinx_markdown_tables |