Skip to content

Commit

Permalink
0
Browse files Browse the repository at this point in the history
  • Loading branch information
hushulin committed Mar 2, 2020
1 parent 40dbfcc commit c8013b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 79 deletions.
18 changes: 3 additions & 15 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('.'))

# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------
Expand All @@ -41,17 +40,6 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx_markdown_tables',


]

# Add any paths that contain templates here, relative to this directory.
Expand Down
64 changes: 0 additions & 64 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,4 @@
# 基本

#### 简介
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"
}
```

First Header | Second Header | Third Header
------------ | ------------- | ------------
Content Cell | Content Cell | Content Cell
Content Cell | Content Cell | Content Cell

#### 查询交易

> 查询交易能力开放是为了商家更好的控制自己的自定义结帐页面,前端可以采取轮询的方式请求此接口,以获得订单实时状态。也可以通过此接口获取到的过期时间设置定时器,定时关闭订单以达到控制交易的效果。
#### 回调地址


1. {host}地址
- 测试环境:
- 正式环境:

0 comments on commit c8013b7

Please sign in to comment.