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 c8013b7 commit a030400
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 34 deletions.
Binary file modified _build/doctrees/environment.pickle
Binary file not shown.
Binary file modified _build/doctrees/index.doctree
Binary file not shown.
5 changes: 0 additions & 5 deletions _build/html/_sources/index.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
}
```

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

#### 查询交易

> 查询交易能力开放是为了商家更好的控制自己的自定义结帐页面,前端可以采取轮询的方式请求此接口,以获得订单实时状态。也可以通过此接口获取到的过期时间设置定时器,定时关闭订单以达到控制交易的效果。
Expand Down
22 changes: 1 addition & 21 deletions _build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,27 +280,7 @@ <h2>创建交易<a class="headerlink" href="#id6" title="Permalink to this headl
<span class="p">}</span>
</pre></div>
</div>
<table border="1" class="docutils">
<thead>
<tr>
<th>First Header</th>
<th>Second Header</th>
<th>Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content Cell</td>
<td>Content Cell</td>
<td>Content Cell</td>
</tr>
<tr>
<td>Content Cell</td>
<td>Content Cell</td>
<td>Content Cell</td>
</tr>
</tbody>
</table></div>
</div>
<div class="section" id="id7">
<h2>查询交易<a class="headerlink" href="#id7" title="Permalink to this headline"></a></h2>
<blockquote>
Expand Down
2 changes: 1 addition & 1 deletion _build/html/searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 15 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
# 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 @@ -40,6 +41,17 @@
# 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
67 changes: 63 additions & 4 deletions index.md
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}地址
- 测试环境:
- 正式环境:
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sphinx_markdown_tables

0 comments on commit a030400

Please sign in to comment.