Merge branch 'master' of ssh://source.supwisdom.com:12388/epayment/epayapidocs
diff --git a/_config.yml b/_config.yml
index c503696..5af5440 100644
--- a/_config.yml
+++ b/_config.yml
@@ -12,7 +12,7 @@
 
 # URL
 ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
-url: http://ykt.supwisdom.com
+  url: http://ykt.supwisdom.com:9112
 root: /yktdocs
 permalink: :title/
 permalink_defaults:
diff --git a/package.json b/package.json
index 62f98cc..fb401f4 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
   "version": "0.0.0",
   "private": true,
   "hexo": {
-    "version": "3.3.1"
+    "version": "3.3.7"
   },
   "dependencies": {
     "hexo": "^3.2.2",
diff --git "a/source/_posts/V5\346\226\260\347\232\204POS\347\255\276\345\210\260\345\217\212\350\231\232\346\213\237\345\215\241\346\266\210\350\264\271\346\216\245\345\217\243.md" "b/source/_posts/V5\346\226\260\347\232\204POS\347\255\276\345\210\260\345\217\212\350\231\232\346\213\237\345\215\241\346\266\210\350\264\271\346\216\245\345\217\243.md"
new file mode 100644
index 0000000..d93da18
--- /dev/null
+++ "b/source/_posts/V5\346\226\260\347\232\204POS\347\255\276\345\210\260\345\217\212\350\231\232\346\213\237\345\215\241\346\266\210\350\264\271\346\216\245\345\217\243.md"
@@ -0,0 +1,409 @@
+---
+title:  V5新的POS签到接口
+date: 2016-06-21 13:45:23
+tags:
+---
+
+# 一、V5新的POS签到接口 #
+
+###1.1 获取token###
+
+**请求URL:**
+
+- `.../v5/manage/pos/gettoken`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| devphyid | String | * | 设备物理ID,与termid必传一个 |
+| termid | String | * | 设备号(终端ID),与devphyid必须传一个 |
+| app_id | String | 是 | APPID |
+| term_id | String | 是 | 终端标识 |
+| timestamp | String | 是 | yyyyMMddhhmmss |
+| sign_method | String | 是 | `HMAC` |
+| sign | String | 是 | 参数签名 |
+
+
+**返回参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| retcode | String | 是 | 0-成功,其他失败 |
+| retmsg | String | 是 | 返回信息,失败时返回错误信息 |
+| devtoken | String | 是 | token值 |
+
+**返回示例:**
+
+```json
+{
+    "retcode": "0",
+    "retmsg": "成功",
+    "devtoken" : "ff8080815a7d38ff015a7d3abb970003"
+}
+
+```
+
+###1.2 pos签到###
+**请求URL:**
+
+- `.../v5/manage/pos/login`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| devphyid | String | * | 设备物理ID,与termid必传一个 |
+| termid | String | * | 设备号(终端ID),与devphyid必须传一个 |
+| termtype | String | 是 | 终端类型 |
+| termdate | String | 是 | 终端日期 |
+| termtime | String | 是 | 终端时间 |
+| deviceno | String | 是 | 终端编号 |
+| devseqno | String | 是 | 终端流水号 |
+| termno | String | 是 | PSAM卡号(后面统一用samno) |
+| paraverno | String | 是 | 参数版本号 |
+| feeverno | String | 是 | 费率版本号 |
+| payverno | String | 是 | 支付组版本号(多账户) |
+| cardverno | String | 是 | 黑名单版本号 |
+| devsoftverno | String | 否 | pos程序版本 |
+| `devmac` | String | 是 | PSAM对token计算得到的MAC |
+| app_id | String | 是 | APPID |
+| term_id | String | 是 | 终端标识 |
+| timestamp | String | 是 | yyyyMMddhhmmss |
+| sign_method | String | 是 | `HMAC` |
+| sign | String | 是 | 参数签名 |
+
+
+**返回参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| retcode | String | 是 | 0-成功,其他失败 |
+| retmsg | String | 是 | 返回信息,失败时返回错误信息 |
+| systime | String | 是 | 系统时间,yyyyMMddhhmmss |
+| devphyid | String | 是 | 终端物理ID |
+| deviceid | int | 是 | 终端ID |
+| paraverno | int | 是 | 设备参数版本号 |
+| feeverno | int | 是 | 设备费率版本号 |
+| payverno | int | 是 | 支付组版本号(多账户) |
+| cardverno | String | 是 | 黑名单版本号 |
+| mf1key | String | 是 | - |
+| paragroupid | int | 是 | 设备参数组ID |
+| feecfgid | int | 是 | 设备费率组ID |
+| paygroupid | int | 是 | 设备支付组ID(多账户) |
+| offlineflag | boolean | 是 | 是否允许脱机消费(多账户) |
+| keyindex | int | 是 | - |
+| onlinetermseqno | long | 是 | 联机终端流水号 |
+| credittermseqno | int | 是 | 授信终端流水号 |
+| offlinetermseqno | long | 是 | 脱机(B模式)终端流水号 |
+
+
+**返回示例:**
+
+```json
+{
+    "retcode": "0",
+    "retmsg": "成功",
+    "systime": "20170410111324",
+    "devphyid": "20000001",
+    "deviceid": 11,
+    "paraverno": 3,
+    "feeverno": 1,
+    "payverno": 2,
+    "cardverno": "170410000012",
+    "mf1key": "ff8080815a7d38ff015a7d3abb970003",
+    "paragroupid": 1,
+    "paygroupid": 1,
+    "feecfgid": 1,
+    "keyindex": 1,
+    "onlinetermseqno": 512,
+    "credittermseqno": 42,
+    "offlinetermseqno": 11
+}
+
+```
+
+###1.3 pos机新刷卡消费接口###
+**请求URL:**
+
+- `.../consume/pos/newcardpay`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| devphyid | String | * | 设备物理ID,与termid必传一个 |
+| termid | String | * | 设备号(终端ID),与devphyid必须传一个 |
+| termseqno | String | 是 | 终端流水号 |
+| cardno | String | 是 | 卡号 |
+| amount | String | 是 | 金额,分 |
+| managefee | String | 是 | 搭伙费 |
+| managefeetype | String | 是 | 搭伙费类型 |
+| credittotal | String | 是 | 累计授信额度 |
+| creditpaycnt | String | 是 | 授信次数 |
+| creditavailable | String | 是 | 剩余授信额度 |
+| creditseqno | String | 是 | 授信期号 |
+| creditflag | Boolean | 是 | 申请授信标志 |
+| shopid | String | 否 | 商户id |
+| sourcetype | String | 是 | 交易渠道,如:‘pos’ |
+| cardmac | String | 是 | 卡mac (新增)|
+| posmac | String | 是 | psam卡mac (新增)|
+| termdate | String | 是 | 终端交易日期 (新增)|
+| termtime | String | 是 | 终端交易时间 (新增)|
+| app_id | String | 是 | APPID |
+| term_id | String | 是 | 终端标识 |
+| timestamp | String | 是 | yyyyMMddhhmmss |
+| sign_method | String | 是 | `HMAC` |
+| sign | String | 是 | 参数签名 |
+
+
+**返回参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| retcode | String | 是 | 0-成功,其他失败 |
+| retmsg | String | 是 | 返回信息,失败时返回错误信息 |
+| needpwdconfirm | Boolean | 是 | 是否需要密码 |
+| accdate | String | 是 | 记账日期 |
+| refno | String | 是 | 交易参考号 |
+| balance | long | 是 | 账户余额 |
+| creditretcode | String | 是 | 授信处理标志 |
+| creditline | Long | 是 | 授信额度 |
+| creditseqno | String | 是 | 授信期号 |
+| nexttermseqno | String | 是 | 下笔终端流水号 |
+| amount | int | 是 | 交易金额 |
+| managefee | int | 是 | 搭伙费 |
+| custname | int | 是 | 姓名 |
+| stuempno | boolean | 是 | 学工号) |
+| cardverno | int | 是 | 卡版本号 |
+| custexpiredate | long | 是 | 客户有效期 |
+| offlineForbidFlag | int | 是 | 禁止脱机消费标志 |
+
+
+# 二、虚拟卡POS消费接口 #
+###2.1 查询账户信息###
+**请求URL:**
+
+- `.../consume/pos/virtualaccquery`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| devphyid | String | * | 设备物理ID,与termid必传一个 |
+| termid | String | * | 设备号(终端ID),与devphyid必须传一个 |
+| vtoken | String | 是 | 虚拟卡token |
+| tokenverno | String | 是 | 虚拟卡token版本 |
+| app_id | String | 是 | APPID |
+| term_id | String | 是 | 终端标识 |
+| timestamp | String | 是 | yyyyMMddhhmmss |
+| sign_method | String | 是 | `HMAC` |
+| sign | String | 是 | 参数签名 |
+
+
+**返回参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| retcode | String | 是 | 0-成功,其他失败 |
+| retmsg | String | 是 | 返回信息,失败时返回错误信息 |
+| balance | Long | 是 | 余额 |
+| frozenbal | Long | 是 | 冻结余额 |
+| feetype | int | 是 | 收费类别(搭伙费等计算) |
+| status | String | 是 | 卡状态 |
+| expiredate | String | 否 | 卡有效期 |
+| onceTimeLimit | Long | 否 | 单次消费限额 |
+| dayTotalLimit | Long | 否 | 日累计消费限额 |
+| custname | String | 是 | 姓名 |
+| stuempno | String | 是 | 学工号 |
+
+###2.2 POS消费###
+**请求URL:**
+
+- `.../consume/pos/virtualcardpay`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| devphyid | String | * | 设备物理ID,与termid必传一个 |
+| termid | String | * | 设备号(终端ID),与devphyid必须传一个 |
+| vtoken | String | 是 | 虚拟卡token |
+| tokenverno | String | 是 | 虚拟卡token版本 |
+| termseqno | String | 是 | 终端流水号 |
+| amount | String | 是 | 交易金额,单位:分|
+| shopid | String | 否 | 商户号 |
+| tradename | String | 否 | 交易名称(默认 `POS消费`) |
+| sourcetype | String | 是 | 交易渠道(pos/dmt/...) |
+| termdate | String | 是 | 终端日期 |
+| termtime | String | 是 | 终端时间 |
+| app_id | String | 是 | APPID |
+| term_id | String | 是 | 终端标识 |
+| timestamp | String | 是 | yyyyMMddhhmmss |
+| sign_method | String | 是 | `HMAC` |
+| sign | String | 是 | 参数签名 |
+
+
+**返回参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| retcode | String | 是 | 0-成功,其他失败 |
+| retmsg | String | 是 | 返回信息,失败时返回错误信息 |
+| needpwdconfirm | Boolean | 是 | 是否要输入密码 |
+| accdate | String | 是 | 记账日期 |
+| refno | String | 是 | 参考号 |
+| balance | String | 是 | 余额 |
+| custname | String | 是 | 姓名 |
+| stuempno | String | 是 | 学工号 |
+| amount | Integer | 是 | 消费金额 |
+| managefee | Integer | 是 | 学工号 |
+
+###2.3 POS密码消费确认###
+**请求URL:**
+
+- `.../consume/pos/virtualcardpayconfirm`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| devphyid | String | * | 设备物理ID,与termid必传一个 |
+| termid | String | * | 设备号(终端ID),与devphyid必须传一个 |
+| termseqno | String | 是 | 终端流水号 |
+| accdate | String | 是 | 记账日期 |
+| refno | String | 是 | 参考号 |
+| cardpwd | String | 是 | 卡密码 (密文)|
+| app_id | String | 是 | APPID |
+| term_id | String | 是 | 终端标识 |
+| timestamp | String | 是 | yyyyMMddhhmmss |
+| sign_method | String | 是 | `HMAC` |
+| sign | String | 是 | 参数签名 |
+
+
+**返回参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| retcode | String | 是 | 0-成功,其他失败 |
+| retmsg | String | 是 | 返回信息,失败时返回错误信息 |
+| needpwdconfirm | Boolean | 是 | 是否要输入密码 |
+| accdate | String | 是 | 记账日期 |
+| refno | String | 是 | 参考号 |
+| balance | String | 是 | 余额 |
+| custname | String | 是 | 姓名 |
+| stuempno | String | 是 | 学工号 |
+| amount | Integer | 是 | 消费金额 |
+| managefee | Integer | 是 | 学工号 |
+
+
+###2.3 POS消费查询###
+**请求URL:**
+
+- `.../consume/pos/virtualcardpayquery`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| devphyid | String | * | 设备物理ID,与termid必传一个 |
+| termid | String | * | 设备号(终端ID),与devphyid必须传一个 |
+| termseqno | String | 是 | 要查询流水的终端流水号 |
+| termdate | String | 是 | 要查询流水的终端日期 |
+| termtime | String | 是 | 要查询流水的终端时间 |
+| app_id | String | 是 | APPID |
+| term_id | String | 是 | 终端标识 |
+| timestamp | String | 是 | yyyyMMddhhmmss |
+| sign_method | String | 是 | `HMAC` |
+| sign | String | 是 | 参数签名 |
+
+
+**返回参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| retcode | String | 是 | 0-成功,其他失败 |
+| retmsg | String | 是 | 返回信息,失败时返回错误信息 |
+| accdate | String | 是 | 流水记账日期 |
+| refno | String | 是 | 流水参考号 |
+| dtlstatus | String | 是 | 流水状态 init-初始化,success-成功,fail-失败 |
+| balance | String | 是 | 余额 |
+| custname | String | 是 | 姓名 |
+| stuempno | String | 是 | 学工号 |
+| amount | Integer | 是 | 消费金额 |
+| managefee | Integer | 是 | 搭伙费、折扣 |
+
+###2.3 POS消费冲正###
+**请求URL:**
+
+- `.../consume/pos/virtualcardpayreverse`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| devphyid | String | * | 设备物理ID,与termid必传一个 |
+| termid | String | * | 设备号(终端ID),与devphyid必须传一个 |
+| termseqno | String | 是 | 终端流水号 |
+| reversetermseqno | String | 是 | 要冲正的终端流水号 (日期仅为当天termdate或前一天)|
+| reversalflag | String | 是 | 冲正标志。CANCEL-自动;REVERSE-手动|
+| termdate | String | 是 | 终端日期|
+| termtime | String | 是 | 终端时间|
+| vtoken | String | 是 | 虚拟卡token(手工冲正必须) |
+| tokenverno | String | 是 | 虚拟卡token版本 (手工冲正必须)|
+| sourcetype | String | 是 | 交易渠道 |
+| app_id | String | 是 | APPID |
+| term_id | String | 是 | 终端标识 |
+| timestamp | String | 是 | yyyyMMddhhmmss |
+| sign_method | String | 是 | `HMAC` |
+| sign | String | 是 | 参数签名 |
+
+
+**返回参数:**
+
+| 参数名 | 类型 | 必须 | 说明 |
+| --- | ----- | ----- | ------ |
+| retcode | String | 是 | 0-成功,其他失败 |
+| retmsg | String | 是 | 返回信息,失败时返回错误信息 |
+| termseqno | String | 是 | 当前流水号 |
+
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232v5-App-\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232v5-App-\346\216\245\345\217\243\346\226\207\346\241\243.md"
new file mode 100644
index 0000000..4035fd1
--- /dev/null
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232v5-App-\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -0,0 +1,1128 @@
+---
+title: 一卡通v5 App 接口文档
+date: 2017-07-13 09:09:48
+tags:
+---
+**修订历史**
+============
+
+| 版本   | 作者   | 日期       | 备注             |
+|--------|--------|------------|------------------|
+| V4.0.0 | 何林青 | 2015-01-06 | 初稿             |
+| v4.0.1 | 汤成   | 2016-3-16  | 增加设备相关接口 |
+
+
+## 前言
+### 编写目的
+
+本文档用于描述了易支付对外提供的所有api接口,包括提供手机app端和pos消费端,供内部业务依据此接口开发提供参考。
+
+### 约定
+
+1.  传输编码统一utf-8
+
+## 接口描述
+### 1.  手机api功能入口
+#### 1.1 注册绑定服务
+
+Uri: *https://ip:port/epayapi/services/bindservice*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称      | 类型   | 是否必须 | 描述                |
+|-----------|--------|----------|---------------------|
+| uid       | String | 是       | 从终端获取的唯一号  |
+| phone     | String | 否       | 手机号              |
+| school    | String | 是       | 学校代码            |
+| userid    | String | 是       | 学号                |
+| username  | String | 是       | 姓名                |
+| idno      | String | 是       | 身份证后六位        |
+| timestamp | String | 是       | 手机时间戳          |
+| platform  | String | 是       | 手机平台android/ios |
+
+例子:
+
+URI:https://ip:port/epayapi/services/bindservice
+
+uid:12309487839029
+
+phone:15089039087
+
+school:01
+
+userid:09893092
+
+username:王小二
+
+idno:092010
+
+timestamp:2015-01-19 13:09:01
+
+platform:android
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+"timestamp": "2015-01-19 16:25:29",
+
+"uid": "12309487839029",
+
+"gid": "10000021",
+
+> "rsapbulic": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCG3ADBVO/ngyMGlIZ6LM62CXrmBQ/lvuo6u/03\\r\\namCFHgxBC9U0E+AawCgf4tgVOzePxlmqqkFgh2NIySAL9e2qcqvUa2a3jjutAdmamfo6raofnr9G\\r\\nf6hO1LZp7NRR0cXgojJyXkTRvDdkR46ZUydMng2AXm6jNr1Sdg643OQ83QIDAQAB\\r\\n",
+
+"isfirstreg": false,
+
+"ispwdset": false
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.2 登录密码初始设置
+
+Uri: *https://ip:port/epayapi/services/auth/pwdset*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称 | 类型   | 是否必须 | 描述     |
+|------|--------|----------|----------|
+| gid  | String | 是       | 客户端号 |
+| pwd  | String | 是       | 密码     |
+| dpwd | String | 是       | 重复密码 |
+
+例子:
+
+URI:https://ip:port/epayapi/services*/auth*/*pwdset*
+
+gid:10000001
+
+pwd:123456
+
+dpwd:123456
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+"retcode":"0",
+
+"retmsg":"设置成功"
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.3登录密码重置
+
+Uri: *https://ip:port/epayapi/services/auth/pwdreset*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称 | 类型   | 是否必须 | 描述     |
+|------|--------|----------|----------|
+| gid  | String | 是       | 客户端号 |
+| opwd | String | 是       | 原始密码 |
+| pwd  | String | 是       | 密码     |
+| dpwd | String | 是       | 重复密码 |
+
+例子:
+
+URI:https://ip:port/epayapi/services*/auth*/*pwdset*
+
+gid:10000001
+
+opwd:654321
+
+pwd:123456
+
+dpwd:123456
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+"retcode":"0",
+
+"retmsg":"重置成功"
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.4登录-设备授权码
+
+Uri: *https://ip:port/epayapi/services/oauth2/device*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称       | 类型   | 是否必须 | 描述                                  |
+|------------|--------|----------|---------------------------------------|
+| client\_id | String | 是       | 客户端标识,统一分配给平台指定客户端id |
+| type       | String | 是       | 类型 device\_code/device\_token       |
+| code       | String | 否       | 验证码                                |
+
+例子:
+
+URI:https://ip:port/epayapi/services/*oauth2/device*
+
+Client\_id:a9020b039900d9001
+
+type:device\_code
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+"retcode":"0",
+
+“code”:255409389383939
+
+“userCode”:1234,
+
+verifyURL:”/user/code”
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.5登录-oauth授权
+
+Uri: *https://ip:port/epayapi/services/oauth2/authlogin*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称     | 类型   | 是否必须 | 描述             |
+|----------|--------|----------|------------------|
+| uid      | String | 是       | 客户端唯一识别码 |
+| gid      | String | 是       | 终端编号         |
+| school   | String | 否       | 学校代码         |
+| userid   | String | 是       | 学工号           |
+| pwd      | String | 是       | 密码             |
+| usercode | String | 否       | 验证码           |
+| platform | String | 否       | 手机平台         |
+
+例子:
+
+URI:[*https://ip:port/epayapi/services/oauth2/authlogin*](https://ip:port/epayapi/services/oauth2/authlogin)
+
+uid:12309487839029
+
+gid:2000100002020101
+
+school:01
+
+userid:09893092
+
+pwd:123456
+
+usercode:092010
+
+platform:android
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+"retcode":"0",
+
+“gid”:2001902902909,
+
+“accname”:”小二”,
+
+“token”:abcde32423523cabb434,
+
+“expiresin”:149059504,
+
+“schoolcode”:”01”
+
+“secretkey”:iosdkfjhs9293i98421kljsjflksjfd
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.6电控校区查询
+
+Uri: *https://ip:port/epayapi/services/elecfee/queryarea*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称 | 类型 | 是否必须 | 描述 |
+|------|------|----------|------|
+|      |      |          |      |
+
+
+例子:
+
+URI:*https://ip:port/epayapi/services/elecfee/queryarea*
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+\["areaId":"1",
+
+"areaName":"A校区"\],\["areaId":"2",
+
+"areaName":"B校区"\]
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.7电控区域查询
+
+Uri: *https://ip:port/epayapi/services/elecfee/querydistricts*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称   | 类型   | 是否必须 | 描述 |
+|--------|--------|----------|------|
+| areaId | 校区id | 是       |      |
+
+
+例子:
+
+URI:*https://ip:port/epayapi/services/elecfee/querydistricts*
+
+areaId:1
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+\["districtId":"101",
+
+" districtName":"A区域"\],\["districtId ":"102",
+
+"districtName ":"B区域"\]
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.8电控楼栋查询
+
+Uri: *https://ip:port/epayapi/services/elecfee/querybuilds*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称       | 类型   | 是否必须 | 描述 |
+|------------|--------|----------|------|
+| areaId     | 校区id | 是       |      |
+| districtId | 区域id | 是       |      |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/elecfee/querybuilds*
+
+areaId:1
+
+districtId:102
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+\["buildId":"101",
+
+" buildName":"al楼"\],\["buildId ":"102",
+
+"buildName ":"B1楼"\]
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.9电控楼层查询
+
+Uri: *https://ip:port/epayapi/services/elecfee/queryfloors*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称       | 类型   | 是否必须 | 描述 |
+|------------|--------|----------|------|
+| areaId     | 校区id | 是       |      |
+| districtId | 区域id | 是       |      |
+| buildId    | 楼栋id | 是       |      |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/elecfee/queryfloors*
+
+areaId:1
+
+districtId:101
+
+buildId:3001
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+\["floorId":"101",
+
+" floorName":"1楼"\],\["floorId ":"102",
+
+"floorName ":"2楼"\]
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.10电控房间查询
+
+Uri: *https://ip:port/epayapi/services/elecfee/queryrooms*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称       | 类型   | 是否必须 | 描述 |
+|------------|--------|----------|------|
+| areaId     | 校区id | 是       |      |
+| districtId | 区域id | 是       |      |
+| buildId    | 楼栋id | 是       |      |
+| floorId    | 楼层id | 是       |      |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/elecfee/queryrooms*
+
+areaId:1
+
+districtId:101
+
+buildId:3001
+
+floorId:1
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+\["roomId":"101",
+
+" roomName":"301"\],\["roomId ":"102",
+
+"roomName ":"302"\]
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.11电控房间电量信息查询
+
+Uri: *https://ip:port/epayapi/services/elecfee/queryroominfo*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称    | 类型   | 是否必须 | 描述 |
+|---------|--------|----------|------|
+| areaId  | 校区id | 是       |      |
+| buildId | 楼栋id | 是       |      |
+| roomId  | 房间id | 是       |      |
+
+
+例子:
+
+URI:*https://ip:port/epayapi/services/elecfee/queryroominfo*
+
+areaId:1
+
+buildId:3001
+
+roomId:1
+
+返回:
+
+> 返回格式:application/json
+
+{"areaId":"1",
+
+“buildId”:3001,
+
+“roomId”:1,
+
+" roomName":"301",
+
+“restElecDegree”:20.9
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.12电控房间电量信息查询
+
+Uri: *https://ip:port/epayapi/services/elecfee/buyelectrity*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称       | 类型           | 是否必须 | 描述   |
+|------------|----------------|----------|--------|
+| areaId     | 校区id         | 是       |        |
+| buildId    | 楼栋id         | 是       |        |
+| roomId     | 房间id         | 是       |        |
+| amount     | 充值金额       | 是       | 单位元 |
+| gid        | 客户端唯一标识 | 是       |        |
+| payrouteid | 支付途径id     | 是       |        |
+| paypwd     | 支付密码       | 是       |        |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/elecfee/queryroominfo*
+
+areaId:1
+
+buildId:3001
+
+roomId:1
+
+amount:10.4
+
+gid:10000001
+
+payrouteid:1
+
+paypwd:123456
+
+返回:
+
+> 返回格式:application/json
+
+{"retcode":"0",
+
+“retmsg”:”充值成功”
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.13账户信息查询
+
+Uri: *https://ip:port/epayapi/services/account/getaccountinfo*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称   | 类型           | 是否必须 | 描述 |
+|--------|----------------|----------|------|
+| gid    | 客户端唯一标识 | 是       |      |
+| userid | 学号           | 是       |      |
+
+
+例子:
+
+URI:*https://ip:port/epayapi/services/account/getaccountinfo*
+
+gid:10000014
+
+userid:098298192
+
+返回:
+
+> 返回格式:application/json
+
+{ “accno”:1
+
+“accname“:”212”,
+
+“status“:1,
+
+“balance“:105,
+
+“availbal“:105,
+
+“frozebal“:0,
+
+“opendate“:”20140509”,
+
+“closedate”:null,
+
+“timelimit“:50,
+
+“daylimit“:100,
+
+Bankcards:1
+
+Schoolcards:1
+
+Schoolcollege:”A学院”
+
+Schoolprofessional:”武警”
+
+Schoolclass:”101”
+
+Mobile:”129839383993”
+
+Email:”sdkfj@kjsdf.com”
+
+Sex:”男”
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.14账单列表查询
+
+Uri: *https://ip:port/epayapi/services/billservice/getbilldata*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称     | 类型           | 是否必须 | 描述     |
+|----------|----------------|----------|----------|
+| gid      | 客户端唯一标识 | 是       |          |
+| pageNo   | 页码           | 是       |          |
+| billtype | 账单类型       | 是       | EPAY/YKT |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/billservice/getbilldata*
+
+gid:10000014
+
+pageNo:1
+
+billtype:”EPAY”
+
+返回:
+
+> 返回格式:application/json
+
+{\[
+
+> *“refno“:20392103929303,*
+>
+> *“paytime“:20150802091029,*
+>
+> *“billname“:”pos消费”,*
+>
+> *“amount“:”10.9”,*
+>
+> *“billtype“:”EPAY”,*
+
+“billstatus“:”2”,
+
+“tradetype”:2\],
+
+\[
+
+> *“refno“:20392103929303,*
+>
+> *“paytime“:20150802091029,*
+>
+> *“billname“:”pos消费”,*
+>
+> *“amount“:”10.9”,*
+>
+> *“billtype“:”EPAY”,*
+
+“billstatus“:”2”,
+
+“tradetype”:2\],
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.15账单明细查询
+
+Uri: *https://ip:port/epayapi/services/billservice/getbilldetail*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称     | 类型           | 是否必须 | 描述     |
+|----------|----------------|----------|----------|
+| gid      | 客户端唯一标识 | 是       |          |
+| refno    | 参考号         | 是       |          |
+| billtype | 账单类型       | 是       | EPAY/YKT |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/billservice/getbilldetail*
+
+gid:10000014
+
+refno:”2013040192029192”
+
+billtype:”EPAY”
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“refno“:20392103929303*
+>
+> *“paytime“:20150802091029*
+>
+> *“billname“:”pos消费”*
+>
+> *“amount“:”10.9”*
+>
+> *“billtype“:”EPAY”*
+
+“billstatus“:”2”,
+
+“organname”:”财务处”,
+
+“paidmethod”:”卡余额”,
+
+“tradetype”:2}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.16挂失卡查询
+
+Uri: *https://ip:port/epayapi/services/ykt/cardlist*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称 | 类型           | 是否必须 | 描述 |
+|------|----------------|----------|------|
+| gid  | 客户端唯一标识 | 是       |      |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/ykt/cardlist*
+
+gid:10000014
+
+返回:
+
+> 返回格式:application/json
+
+\[{
+
+> *“cardno“:100092*
+>
+> *“cardphytypename“:cpu卡*
+
+}\]
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.17卡挂失
+
+Uri: *https://ip:port/epayapi/services/ykt/cardloss*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称    | 类型           | 是否必须 | 描述 |
+|---------|----------------|----------|------|
+| gid     | 客户端唯一标识 | 是       |      |
+| cardno  | 卡号           | 是       |      |
+| cardpwd | 卡密码         | 是       |      |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/ykt/cardloss*
+
+gid:10000014
+
+cardno:”100092”
+
+cardpwd:”111111”
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:”挂失成功”*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.18圈存银行卡列表查询
+
+Uri: *https://ip:port/epayapi/services/charge/bankcard/list*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称     | 类型           | 是否必须 | 描述 |
+|----------|----------------|----------|------|
+| gid      | 客户端唯一标识 | 是       |      |
+| payroute | 充值方式       | 是       |      |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/charge/bankcard/list*
+
+gid:10000014
+
+payroute:”1”
+
+返回:
+
+> 返回格式:application/json
+
+\[{
+
+> *“bankcardno“:1002920192393909,*
+>
+> *“bankname“:”中国银行”,*
+
+}\]
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.19充值初始化
+
+Uri: *https://ip:port/epayapi/services/charge/term/init*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称     | 类型           | 是否必须 | 描述 |
+|----------|----------------|----------|------|
+| gid      | 客户端唯一标识 | 是       |      |
+| payroute | 充值方式       | 是       |      |
+| amount   | 充值金额       | 是       |      |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/charge/term/init*
+
+gid:10000014
+
+payroute:”1”
+
+amount:”10.4”
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:”初始化成功”,*
+>
+> *“refno”:”20140809120901000001”*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.20圈存充值
+
+Uri: *https://ip:port/epayapi/services/charge/term/qctrans*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称     | 类型           | 是否必须 | 描述 |
+|----------|----------------|----------|------|
+| gid      | 客户端唯一标识 | 是       |      |
+| payroute | 充值方式       | 是       |      |
+| amount   | 充值金额       | 是       |      |
+| refno    | 参考号         | 是       |      |
+| paypwd   | 支付密码       | 是       |      |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/charge/term/qctrans*
+
+gid:10000014
+
+payroute:”1”
+
+amount:”10.4”
+
+refno:”20140902103001000001”
+
+paypwd:123456
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:”充值成功”,*
+>
+> *“refno”:”20140809120901000001”*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 1.21圈存充值结果查询
+
+Uri: *https://ip:port/epayapi/services/charge/term/qcresultquery*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称     | 类型           | 是否必须 | 描述 |
+|----------|----------------|----------|------|
+| gid      | 客户端唯一标识 | 是       |      |
+| payroute | 充值方式       | 是       |      |
+| amount   | 充值金额       | 是       |      |
+| refno    | 参考号         | 是       |      |
+
+例子:
+
+URI:*https://ip:port/epayapi/services/charge/term/qcresultquery*
+
+gid:10000014
+
+payroute:”1”
+
+amount:”10.4”
+
+refno:”20140902103001000001”
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:”交易成功”,*
+>
+> *“refno”:”20140809120901000001”*
+>
+> *“successtime”:2014-05-05 10:43:29*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\345\234\210\345\255\230\345\257\271\346\216\245\345\211\215\347\275\256\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\345\234\210\345\255\230\345\257\271\346\216\245\345\211\215\347\275\256\346\216\245\345\217\243\346\226\207\346\241\243.md"
index c084577..a6ddf7c 100644
--- "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\345\234\210\345\255\230\345\257\271\346\216\245\345\211\215\347\275\256\346\216\245\345\217\243\346\226\207\346\241\243.md"
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\345\234\210\345\255\230\345\257\271\346\216\245\345\211\215\347\275\256\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -18,19 +18,21 @@
 ## 约定 ##
 
 1.	传输编码统一为utf-8
-2. 请求数据都用HAMC签名加密,收到请求参数后可验证数据正确性,秘钥共同约定。**`SIGN_ALGORITHMS ="HmacSHA1"`**;
+2. 请求数据都用RSA签名加密,收到请求参数后可验证数据正确性,秘钥共同约定。**`SIGN_ALGORITHMS ="SHA1withRSA"`**;
 3. **retcode** 等于"0"(字符串)表示成功,其他表示失败,失败具体信息查看 **retmsg**
 4. **{bank}** 为银行标识,区别不同的银行圈存
 
 
 ## 接口定义
-###  0. 银行卡绑定
-* **URL: .../bankservice/{bank}/bindbankcard**
+###  0. 银行卡绑定/解绑
+* **绑定URL: .../bankservice/{bank}/bindbankcard**
+* **解绑URL: .../bankservice/{bank}/unbindbankcard**
+
 
 * **请求方式**
 `POST`
 
-*绑定银行卡*
+*绑定/解绑银行卡*
 
 * **请求参数**
 - `bankcardno` - 银行账号(银行卡号)
@@ -115,7 +117,7 @@
 - `termid` - 终端编号(可选)
 - `tradetime` - 请求时间, 格式yyyyMMddHHmmss
 - `timeout` - (可选)前置机与银行通讯的超时时间,单位秒,范围 1 ~ 90 , 默认值为10
-- `sign` 签名。除sign的非空字段按上述顺序拼接进行签名加密,如(bankcardno+refno+custid+stuempno+idtype+idno+amount+termid+ tradetime+timeout)。
+- `sign` 签名。除sign的非空字段按上述顺序拼接进行签名加密,如(bankcardno+refno+stuempno+custid+idtype+idno+amount+termid+ tradetime+timeout)。
 
 * **返回**
 - `retcode` - "0" 标识操作成功,其余为异常情况
@@ -154,7 +156,7 @@
 
 
 * **返回**
-- `retcode` - "0" 标识查询到指定的圈存流水,并交易成功;"01" 标识无指定流水,其它表示错误
+- `retcode` - "0" 标识查询到指定的圈存流水,并交易成功;其它表示错误
 - `retmsg` -"msg" 返回信息
 - `bankseqno` - (可选)如果查询到圈存流水则返回银行端流水号,但不是所有银行都支持返回银行端流水号
 
@@ -203,57 +205,48 @@
 }
 ```
 
-### 5. 圈存对账
-* **URL: .../bankservice/{bank}/chargedtlchk**
+### 5. 发送对账单
+* **URL: http(s)://ip:port/epayapi/services/bankservice/sendchkbilldata**
 
 * **请求方式**
 `POST`
 
-圈存流水对账接口,一卡通系统每天定时的访问这个接口查询前一天或过去某一天的全部圈存流水(交易成功),与系统记录的圈存流水进行比对,不一致时进行业务处理。
+API接收对账单统一接口,由前置发起调用。前置拉取对账单后调用此接口向API发送解析后的对账数据。
 
 * **请求**
-- `transdate` - 查询日期,yyyyMMdd
-- `bankcode` - 银行标识
-- `billtype` - 查询类型,有的银行圈存转账和退款可能是分开的。"ALL"-查询圈存和冲正(退款)所有交易成功的流水;"SUCCESS"-查询圈存交易成功的流水;"REFUND"-查询冲正(退款)所有交易成功的流水。
-- `offset` - 偏移量,int型,初始为0
-- `tradetime` - 请求时间, 格式yyyyMMddHHmmss
-- `timeout` - (可选)前置机与银行通讯的超时时间,单位秒,范围 1 ~ 90 , 默认值为10
-- `checkagain` - 重新对账标志,1-是重新对账;0-不是
-- `sign` 签名。除sign的非空字段按上述顺序拼接进行签名加密(transdate + bankcode + billtype + offset + tradetime + timeout + checkagain)。
+- `accdate` - 账单日期,yyyyMMdd
+- `chkcode` - 账单标识,若是银行对账,传银行标识{bankcode}。‘alipay’-支付宝,‘wechat’- 微信,‘wmxy’-完美校园等
+- `thirdpartid` -第三方ID,非必传。如充值机对账时的终端ID等
+- `errmsg` - 存放错误信息(拉取第三方对账单失败时也要调用此接口,发送错误原因),默认为空。(明确某天系统无对账单时,是拉取对账单失败或解析失败等,而不是前置或系统异常导致)
+- `pageno` - 分批次上传时,pageno逐次递增,初始为1(1,2,3,...),不能跳跃
+- `endflag` - 结束标志。true-全部上传完成,false-未上传完成,还需继续
+- `app_id` - 前置配置的APPID
+- `timestamp` - 时间戳 ‘yyyyMMddHHmmss’
+- `sign ` - 签名数据 (accdate+chkcode+pageno+endflag+ timestamp +APPKEY 最后MD5)
+- `data` -数据集合
+   - `transdate` - 交易日期 yyyyMMdd
+	- `transtime` - 交易时间 HHmmss
+	- `stuempno` - 系统唯一号,如学工号、客户号
+	- `thirdpartaccno` - 支付宝、微信、银行卡号等账号
+	- `refno` - 系统交易参考号,本地流水号
+	- `thirdpartrefno` - 第三方流水号,银行、支付宝、微信流水号
+	- `amount` - 交易金额,单位分。
+	- `billtype` - 流水状态标志。('SUCCESS'-圈存成功流水;‘BEREFD’-被冲正的圈存流水; -'REFUND'-冲正流水)
+
 
 * **返回**
 - `retcode` - "0" 标识冲正成功,其它表示错误
 - `retmsg` -"msg" 返回信息
-- `hasnext` - true或false。是否继续查询的标志。true继续查询,false结束查询
-- `offset` - 继续查询时的偏移量,int型。
-- `data` - 流水数据集合。
-	- `transdate` - 交易日期 yyyyMMdd
-	- `transtime` - 交易时间 HHmmss
-	- `stuempno` - 系统唯一号,如学工号、客户号
-	- `bankcardno` - 银行账号
-	- `refno` - 系统交易参考号,
-	- `bankseqno` - 银行端流水号
-	- `amount` - 交易金额,单位元
-	- `billtype` - 圈存或冲正的标志。('SUCCESS'-圈存成功流水;‘BEREFD’-被冲正的圈存流水; -'REFUND'-冲正流水)
-
+- `totalcnt` - 收到的流水笔数
+- `totalamt` - 收到的流水金额,单位元
+	
 
 ```json
 {
     "retcode":"0",
     "retmsg":"msg", // 返回信息
-    "hasnext":true,
-    "offset":100,
-    "data":[
-    			{
-    				"transdate":"20160901",
-    				"tramsdate":"142328",
-    				"stuempno":"20170001",
-    				"bankcardno":"6022111001004394733",
-    				"refno":"20160901142328000023",
-    				"bankseqno":"1020160901142328130713",
-    				"amount":50.0,
-    				"billtype":"SUCCESS"
-    			},...]
+    "totalcnt":100,
+    "totalamt":2340.00
 }
 ```
 
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\345\257\271\346\216\245\351\223\266\350\201\224\347\224\265\345\255\220\346\240\241\345\233\255\345\215\241\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\345\257\271\346\216\245\351\223\266\350\201\224\347\224\265\345\255\220\346\240\241\345\233\255\345\215\241\346\216\245\345\217\243\346\226\207\346\241\243.md"
new file mode 100644
index 0000000..5f2f8de
--- /dev/null
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\345\257\271\346\216\245\351\223\266\350\201\224\347\224\265\345\255\220\346\240\241\345\233\255\345\215\241\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -0,0 +1,386 @@
+## 约定 ##
+
+1.	传输编码统一为utf-8
+2.	RSA 加密算法为本接口采用的非对称加密算法,`SIGN_ALGORITHMS ="SHA1WithRSA"`;
+3.	RSA公钥由本系统提供,本系统返回信息的签名数据,第三方系统得到后通过公钥校验算法,验证返回数据的合法性 
+4.	HMAC加密算法为用户请求本系统采用的加密算法,`SIGN_ALGORITHMS ="HMAC-SHA1"`;
+5.	具体签名生成参考后面的签名章节
+6.	retcode等于0表示成功,非0表示失败,失败具体信息查看retmsg
+
+## 电子校园卡绑定 ##
+**请求URL:**
+
+- `http(s)://ip:port/epayapi/services/thirdparty/unionpay/ecardbind`
+
+**请求方式/格式:**
+
+- post
+- content-type: application/x-www-form-urlencoded
+
+**请求参数**
+
+| 参数名 | 类型 | 必传 | 备注 |
+|-------|--------|-------|--------|
+|partner_id|String|是|本系统分配给各个接入应用的合作伙伴id号|
+|schoolcode|String|是|学校代码|
+|stuempno|String|是|学工号|
+|custname|String|是|姓名|
+|idtype|String|否|证件类型|
+|idno|String|否|证件号|
+|mobile|String|否|手机号|
+|timestamp|String|是|时间戳 yyyyMMddHHmmss|
+|sign_method|String|是|`HMAC`|
+|sign|String|是|签名|
+
+**返回参数**
+
+| 参数名 | 类型 | 必传 | 备注 |
+|-------|--------|-------|--------|
+|retcode|String|是|0-成功;其他失败|
+|retmsg|String|是|错误信息|
+|ecardno|String|否| 电子校园卡卡号,成功时必传|
+|ecardaccno|String|否|电子校园卡账号,成功时必传|
+
+
+## 电子校园卡解绑 ##
+**请求URL:**
+
+- `http(s)://ip:port/epayapi/services/thirdparty/unionpay/ecardunbind`
+
+**请求方式/格式:**
+
+- post
+- content-type: application/x-www-form-urlencoded
+
+**请求参数**
+
+| 参数名 | 类型 | 必传 | 备注 |
+|-------|--------|-------|--------|
+|partner_id|String|是|本系统分配给各个接入应用的合作伙伴id号|
+|schoolcode|String|是|学校代码|
+|ecardno |String|是|电子校园卡号|
+|timestamp|String|是|时间戳 yyyyMMddHHmmss|
+|sign_method|String|是|`HMAC`|
+|sign|String|是|签名|
+
+**返回参数**
+
+| 参数名 | 类型 | 必传 | 备注 |
+|-------|--------|-------|--------|
+|retcode|String|是|0-成功;其他失败|
+|retmsg|String|是|错误信息|
+
+
+
+## 账户余额查询 ##
+
+**请求URL:**
+
+- `http(s)://ip:port/epayapi/services/thirdparty/common/accountquery`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+|参数名 | 类型 | 必选 | 说明 |
+|-----|------|-----|------|
+|partner_id|String|是      |本系统分配给各个接入应用的合作伙伴id号|
+|stuempno|String|是|用户唯一号(学工号)。与卡片物理ID必传一项|
+|useridtype|String|否|指定用户唯一号值的类型。`STUEMPNO`-stuempno为学工号;`CARDPHYID`-stuempno为卡物理ID;`ECARDNO`-电子校园卡号;为空时默认stuempno为学工号|
+|timestamp|String|是|时间戳格式为yyyyMMddhh24miss|
+|sign|String|是|	签名|
+|sign_method|String|是|固定填: HMAC (加密方式为HAMC-SHA1)|
+
+**请求内容示例:**
+```
+
+- URI:http(s)://ip:port/epayapi/services/thirdparty/common/accountquery
+- partner_id:10000
+- stuempno:09893092
+- timestamp:20150119130901
+- sign:5195f9b9116e4adf67eeebc9935d33dc683f677d
+- sign_method:HMAC
+
+```
+
+**返回示例:**
+
+- 成功
+
+```json
+{
+    "retcode": "0",
+    "retmsg": "query success",
+    "status": "normal",
+    "balance": 5040,
+    "frozenbal": 0,
+    "expiredate": "20300801",
+    "onceTimeLimit": 3000,
+    "dayTotalLimit": 20000
+}
+
+```
+
+- 失败
+
+```json
+{
+    "retcode": "51",
+    "retmsg": "card is lost"
+}
+
+```
+
+
+**返回参数说明:**
+
+|参数名 | 类型 | 说明 |
+|-----|-----|------|
+|retcode|String|返回码(0=成功,其他为失败)|
+|retmsg|String|返回消息|
+| status |String|状态 normal 正常,其他返回错误|
+|balance|Integer|余额(分)|
+| frozenbal |Integer|冻结金额(分)|
+| expiredate |String|卡有效期|
+| onceTimeLimit |Integer|单次消费最高限额(分),超出要输卡密码|
+| dayTotalLimit |Integer|当天累计消费限额(分),超出要输入卡密码|
+
+## 通用账户流水查询 ##
+
+**请求URL:**
+
+- `http(s)://ip:port/epayapi/services/thirdparty/common/getbilldata`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+|参数名 | 类型 | 必选 | 说明 |
+|-----|------|-----|------|
+|partner_id|String|是      |本系统分配给各个接入应用的合作伙伴id号|
+|stuempno|String|是|	查询对象的唯一号(学工号)|
+|useridtype|String|否|指定用户唯一号值的类型。`STUEMPNO`-stuempno为学工号;`CARDPHYID`-stuempno为卡物理ID;`ECARDNO`-电子校园卡号;为空时默认stuempno为学工号|
+|pageno|String|否|	页码,默认1|
+|pagesize|String|否|	每页行数,默认10,范围10-500|
+|startdate|String|是|	开始时间 格式yyyyMMdd 最多3个月前|
+|enddate|String|是|	结束日期 格式yyyyMMdd|
+|timestamp|String|是|时间戳格式为yyyyMMddhh24miss|
+|sign|String|是|	签名|
+|sign_method|String|是| HMAC 加密方式为HAMC-SHA1|
+
+**请求内容示例:**
+```
+
+- URI:http(s)://ip:port/epayapi/services/thirdparty/common/getbilldata
+- partner_id:10000
+- pageno:1
+- pagesize:10
+- startdate:20150829
+- enddate:20150929
+- timestamp:20150119130901
+- sign:5195f9b9116e4adf67eeebc9935d33dc683f677d
+- sign_method:HMAC
+
+```
+
+**返回示例:**
+
+- 成功
+
+```json
+{
+    "retcode": "0",
+    "retmsg": "查询成功",
+    "data": {
+        "totalCount": 11,
+        "pageSize": 10,
+        "pageNo": 1,
+        "list": [
+            {
+                "refno": "20170809160440168058",
+                "paytime": "20170809160449",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
+                "billstatus": 2,
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机1"
+            },
+            {
+                "refno": "20170809103401168050",
+                "paytime": "20170809103413",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
+                "billstatus": 2,
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机3"
+            },
+            {
+                "refno": "20170809101226168047",
+                "paytime": "20170809101238",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
+                "billstatus": 2,
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机2"
+            },
+            {
+                "refno": "20170809101217168046",
+                "paytime": "20170809101229",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
+                "billstatus": 2,
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机1"
+            },
+            {
+                "refno": "20170809100854168045",
+                "paytime": "20170809100905",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
+                "billstatus": 2,
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机1"
+            },
+            {
+                "refno": "20170809100845168043",
+                "paytime": "20170809100824",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
+                "billstatus": 2,
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机1"
+            },
+            {
+                "refno": "20170809100845168044",
+                "paytime": "20170809100824",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费撤销",
+                "billstatus": 2,
+                "tradetype": "1",
+                "tradecode": "6632",
+                "termname":"第一食堂POS机1"
+            },
+            {
+                "refno": "20170807145900002705",
+                "paytime": "20170807145958",
+                "billname": "现金充值",
+                "amount": 270,
+                "billtype": "钱包充值",
+                "billstatus": 2,
+                "tradetype": "1",
+                "tradecode": "6500",
+                "termname":"第一食堂充值机1"
+            }
+        ],
+        "firstResult": 0,
+        "totalPage": 2,
+        "firstPage": true,
+        "lastPage": false,
+        "nextPage": 2,
+        "prePage": 1
+    }
+}
+```
+
+- 失败
+
+```json
+{
+    "retcode": "304",
+    "retmsg": "签名验证失败",
+    "data": null
+}
+
+```
+
+**返回参数说明:**
+
+|参数名 | 类型 | 说明 |
+|-----|-----|------|
+|retcode|String|返回码(0=成功,其他为失败)|
+|retmsg|String|返回消息|
+|data|list|流水明细集合|
+
+**流水明细说明:**
+
+|参数名 | 类型 | 说明 |
+|-----|-----|------|
+| refno |String|交易参考号|
+| paytime|String|交易时间 yyyyMMddhh24miss|
+| billname|String |交易名称 |
+|amount|Integer|交易金额(元)|
+|billtype|String|交易类型|
+|billstatus|String|状态 2-成功 3-失败|
+| tradetype |String|交易方向 1-充值 2-消费|
+|tradecode|String|交易码|
+|termname | String|终端名称|
+
+
+
+## 附录A-用户请求HMAC签名算法 ##
+
+
+- 签名方式:`hmac-sha1`
+
+- 签名密钥由本系统统一线下提供
+
+
+**签名校验的通用步骤如下:**
+
+**第一步:** 设所有发送或者接收到的数据为集合M,将集合M内非空参数值的参数按照参数名ASCII码从小到大排序(字典序),使用URL键值对的格式(即key1=value1&key2=value2…)拼接成字符串stringA。
+
+> 假设传送的参数如下:
+
+
+```
+	partner_id:10000
+	openid:xv909vsfijksf9912
+	stuempno:09893092
+	timestamp:20150119130901
+	sign:5195f9b9116e4adf67eeebc9935d33dc683f677d
+	sign_method:HMAC
+```
+> 对参数按照key=value的格式,并按照参数名ASCII字典序排序如下:
+
+
+```
+	openid=xv909vsfijksf9912&partner_id=10000&sign_method=HMAC&stuempno=09893092&timestamp=20150119130901
+```
+
+** 特别注意以下重要规则:**
+
+
+- 参数名ASCII码从小到大排序(字典序);
+
+
+- 如果参数的值为空不参与签名;
+
+
+- 参数名区分大小写;
+
+
+- 传送的sign参数不参与签名,用该sign值作校验。
+
+
+**第二步:** 用密钥secretkey对stringA字符串,进行hmac-sha1签名,得到sign值signValue。signValue最后采用十六进制小写hex编码生成签名字符串。
+
+
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\345\271\263\345\217\260\347\273\210\347\253\257\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\345\271\263\345\217\260\347\273\210\347\253\257\346\216\245\345\217\243\346\226\207\346\241\243.md"
new file mode 100644
index 0000000..966e4af
--- /dev/null
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\345\271\263\345\217\260\347\273\210\347\253\257\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -0,0 +1,2489 @@
+---
+title: 一卡通v5平台终端接口文档
+date: 2017-07-12 15:04:23
+tags:
+---
+
+**修订历史**
+============
+
+| 版本   | 作者   | 日期       | 备注             |
+|--------|--------|------------|------------------|
+| V4.0.0 | 何林青 | 2015-01-06 | 初稿             |
+| v4.0.1 | 汤成   | 2016-3-16  | 增加设备相关接口 |
+
+
+## 前言
+### 编写目的
+
+本文档用于描述了易支付对外提供的所有api接口,包括提供手机app端和pos消费端,供内部业务依据此接口开发提供参考。
+
+### 约定
+1.  传输编码统一utf-8
+
+
+
+### 2.终端消费功能入口
+#### 2.1 消费初始化
+
+Uri: *https://ip:port/epayapi/services/consume/pos/init*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型   | 是否必须 | 描述       |
+|--------------|--------|----------|------------|
+| barcode      | String | 是       | 客户支付码 |
+| app\_id      | String | 是       | 应用分配id |
+| term\_id     | String | 是       | 终端id     |
+| term\_no     | String | 是       | Psam卡号   |
+| merchaccno   | String | 是       | 商户号     |
+| amount       | String | 是       | 交易金额   |
+| timestamp    | String | 是       | 时间戳     |
+| sign         | String | 是       | 签名       |
+| sign\_method | String | 是       | 签名方法   |
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/init
+
+barcode:12309487839029
+
+app\_id:15089039087
+
+term\_id:01
+
+term\_no:10001
+
+merchaccno:09893092
+
+amount:100
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:2015-01-19 13:09:01
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”初始化成功”
+
+“refno”:”交易参考号”
+
+}
+
+#### 2.2消费确认
+
+Uri: *https://ip:port/epayapi/services/consume/pos/confirm*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型   | 是否必须 | 描述       |
+|--------------|--------|----------|------------|
+| refno        | String | 是       | 交易参考号 |
+| app\_id      | String | 是       | 应用分配id |
+| term\_id     | String | 是       | 终端id     |
+| term\_no     | String | 是       | Psam卡号   |
+| timestamp    | String | 是       | 时间戳     |
+| sign         | String | 是       | 签名       |
+| sign\_method | String | 是       | 签名方法   |
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/confirm
+
+refno:12309487839029
+
+app\_id:15089039087
+
+term\_id:01
+
+term\_no:10001
+
+amount:100
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:2015-01-19 13:09:01
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”
+
+“refno”:”交易参考号”
+
+}
+
+#### 2.3卡片信息查询
+
+Uri: *https://ip:port/epayapi/services/consume/pos/accquery*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称            | 类型    | 是否必须 | 描述                                     |
+|-----------------|---------|----------|--------------------------|
+| cardno          | Integer | 是       | 卡号                                     |
+| credittotal     | Long    | 否       | 授信消费总额                             |
+| creditpaycnt    | Integer | 否       | 授信消费次数                             |
+| creditavailable | Long    | 否       | 可用授信                                 |
+| creditseqno     | Integer | 否       | 授信序号                                 |
+| sourcetype      | String  | 否       | 消费渠道来源cardreader/pos/thirdpart/dmt |
+| app\_id         | String  | 是       | 应用分配id                               |
+| timestamp       | String  | 是       | 时间戳                                   |
+| sign            | String  | 是       | 签名                                     |
+| sign\_method    | String  | 是       | 签名方法HMAC                             |
+
+签名字段cardno+credittotal+creditpaycnt+creditavailable+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/*accquery*
+
+cardno:10
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:2015-01-19 13:09:01
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“balance”:”可用余额”,
+
+“frozenbal”:”冻结金额”,
+
+“expiredate”:”有效期”,
+
+“status”:”账户状态”
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.4卡片在线消费
+
+Uri: *https://ip:port/epayapi/services/consume/pos/cardpay*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称            | 类型    | 是否必须     | 描述                                     |
+|-----------------|---------|--------------|------------------------------------------|
+| termid          | Integer | 是(二选一) | 设备终端号                               |
+| devphyid        | String  | 是(二选一) | 设备物理id                               |
+| termseqno       | Integer | 是           | 设备终端流水号                           |
+| cardno          | Integer | 是           | 卡号                                     |
+| amount          | Long    | 是           | 消费金额(分)                           |
+| managefee       | Long    | 否           | 管理费(分)                             |
+| managefeetype   | String  | 否           | 管理费类型(discont,mealer,none,…)      |
+| credittotal     | Long    | 否           | 授信消费总额                             |
+| creditpaycnt    | Integer | 否           | 授信消费次数                             |
+| creditavailable | Long    | 否           | 可用授信                                 |
+| creditseqno     | Integer | 否           | 授信序号                                 |
+| creditflag      | Boolean | 否           | 更新授信标识                             |
+| sourcetype      | String  | 否           | 消费渠道来源cardreader/pos/thirdpart/dmt |
+| app\_id         | String  | 是           | 应用分配id                               |
+| term\_id        | String  | 是           | 应用内部分配终端号                       |
+| timestamp       | String  | 是           | 时间戳                                   |
+| sign            | String  | 是           | 签名                                     |
+| sign\_method    | String  | 是           | 签名方法HMAC                             |
+
+签名字段termid+devphyid+termseqno+cardno+amount+managefee+managefeetype+credittotal+creditpaycnt+creditavailable+creditflag+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/*cardpay*
+
+termid:11
+
+devphyid:00000001
+
+termseqno:1
+
+cardno:10
+
+amount:200
+
+managefee:0
+
+managefeetype:none
+
+credittotal:208
+
+creditavailable:10000
+
+creditseqno:2
+
+creditflag:false
+
+sourcetype:pos
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“refno”:”交易参考号”,
+
+“accdate”:”记账日期”,
+
+“balance”:”账户余额”,
+
+“creditline”:”授信额度”,
+
+“creditseqno”:”授信交易序号”,
+
+“needpwdconfirm”:true
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+Needpwdconfirm 如果交易金额超过单日累计或者单次限额,标识为true,需要密码确认,交易暂未成功,需要输入密码成功发送成功交易确认才完成交易。
+
+#### 2.5卡片在线消费密码确认
+
+Uri: *https://ip:port/epayapi/services/consume/pos/cardpayconfirm*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须     | 描述               |
+|--------------|---------|--------------|--------------------|
+| termid       | Integer | 是(二选一) | 设备终端号         |
+| devphyid     | String  | 是(二选一) | 设备物理id         |
+| termseqno    | Integer | 是           | 设备终端流水号     |
+| accdate      | String  | 是           | 记账日期           |
+| refno        | String  | 是           | 交易参考号         |
+| issuccess    | boolean | 是           | 密码校验是否成功   |
+| app\_id      | String  | 是           | 应用分配id         |
+| term\_id     | String  | 是           | 应用内部分配终端号 |
+| timestamp    | String  | 是           | 时间戳             |
+| sign         | String  | 是           | 签名               |
+| sign\_method | String  | 是           | 签名方法HMAC       |
+
+签名字段termid+devphyid+termseqno+accdate+refno+issuccess+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/*cardpayconfirm*
+
+termid:11
+
+devphyid:00000001
+
+termseqno:1
+
+accdate:20150809
+
+refno:20001290214309182312
+
+issuccess:true
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“refno”:”交易参考号”,
+
+“accdate”:”记账日期”,
+
+“balance”:”账户余额”,
+
+“creditline”:”授信额度”,
+
+“creditseqno”:”授信交易序号”,
+
+“needpwdconfirm”:false
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.6卡片在线消费充正
+
+Uri: *https://ip:port/epayapi/services/consume/pos/cardpayreverse*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称             | 类型      | 是否必须     | 描述                    |
+|------------------|-----------|--------------|-------------------------|
+| termid           | Integer   | 是(二选一) | 设备终端号              |
+| devphyid         | String    | 是(二选一) | 设备物理id              |
+| termseqno        | Integer   | 是           | 设备终端流水号          |
+| reversetermseqno | Integer   | 是           | 充正终端流水号          |
+| reversalflag     | String    | 是           | 充正类型CANCEL/REVERSAL |
+| termdate         | String(8) | 否           | 充正日期YYYYMMDD        |
+| termtime         | String(6) | 否           | 充正时间HH24MISS        |
+| app\_id          | String    | 是           | 应用分配id              |
+| term\_id         | String    | 是           | 应用内部分配终端号      |
+| timestamp        | String    | 是           | 时间戳                  |
+| sign             | String    | 是           | 签名                    |
+| sign\_method     | String    | 是           | 签名方法HMAC            |
+
+签名字段termid+devphyid+termseqno+reversetermseqno +nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/*cardpayreverse*
+
+termid:11
+
+devphyid:00000001
+
+termseqno:1
+
+reversetermseqno:10
+
+reversalflag:reversal
+
+termdate:20150901
+
+termtime:090802
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“termseqno”:”流水号”
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.7卡片授信消费流水上传
+
+Uri: *https://ip:port/epayapi/services/consume/pos/creditdtlupload*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称                | 类型    | 是否必须 | 描述                                    |
+|---------------------|---------|----------|-----------------------------------------|
+| devphyid            | String  | 是       | 设备物理id                              |
+| termseqno           | Integer | 是       | 设备终端流水号                          |
+| transdate           | String  | 是       | 交易日期                                |
+| transtime           | String  | 是       | 交易时间                                |
+| cardno              | Integer | 是       | 卡号                                    |
+| amount              | Long    | 是       | 消费金额(分)                          |
+| managefee           | Long    | 否       | 管理费(分)                            |
+| managefeetype       | String  | 否       | 管理费类型(discont,mealer,none,…)     |
+| credittotal         | Long    | 否       | 授信消费总额                            |
+| creditpaycnt        | Integer | 否       | 授信消费次数                            |
+| creditavailable     | Long    | 否       | 可用授信                                |
+| creditseqno         | Integer | 否       | 授信序号                                |
+| lastdevphyid        | String  | 是       | 上次设备物理id                          |
+| lasttermseqno       | Integer | 是       | 上次设备终端流水号                      |
+| lasttransdate       | String  | 是       | 上次交易日期                            |
+| lasttranstime       | String  | 是       | 上次交易时间                            |
+| lastamount          | Long    | 是       | 上次消费金额(分)                      |
+| lastmanagefee       | Long    | 否       | 上次管理费(分)                        |
+| lastmanagefeetype   | String  | 否       | 上次管理费类型(discont,mealer,none,…) |
+| lastcreditavailable | Long    | 否       | 上次可用授信                            |
+| lastcreditseqno     | Integer | 否       | 上次授信序号                            |
+| available           | boolean | 是       | 是否可用                                |
+| reversalflag        | Boolean | 是       | 充正标识                                |
+| app\_id             | String  | 是       | 应用分配id                              |
+| term\_id            | String  | 是       | 应用内部分配终端号                      |
+| timestamp           | String  | 是       | 时间戳                                  |
+| sign                | String  | 是       | 签名                                    |
+| sign\_method        | String  | 是       | 签名方法HMAC                            |
+
+签名字段devphyid+termseqno+transdate+transtime+cardno+amount+managefee+managefeetype+credittotal+creditpaycnt+creditavailable +nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/*cardpay*
+
+devphyid:09200101
+
+termseqno:1
+
+transdate:”20150909”
+
+transtime:”050606”
+
+cardno:123
+
+amount:100
+
+managefee:0
+
+managefeetype:none
+
+credittotal:209
+
+creditpaycnt:14
+
+creditavailable:10000
+
+creditseqno:1
+
+lastdevphyid:90299
+
+lasttermseqno:1
+
+lasttransdate:”20150909”
+
+lasttranstime:”092802”
+
+lastamount:200
+
+lastmanagefee:0
+
+lastmanagefeetype:none
+
+lastcreditavailable:900
+
+lastcreditseqno:1
+
+available:true
+
+reversalfalg:reserval
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“termseqno”:”授信交易序号”
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.8卡片充值
+
+Uri: *https://ip:port/epayapi/services/charge/pos/confirmcharge*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称            | 类型    | 是否必须     | 描述                       |
+|-----------------|---------|--------------|----------------------------|
+| termid          | Integer | 是(二选一) | 设备终端号                 |
+| devphyid        | String  | 是(二选一) | 设备物理id                 |
+| termseqno       | Integer | 是           | 设备终端流水号             |
+| cardno          | Integer | 是           | 卡号                       |
+| fundtype        | Integer | 是           | 资金类型1现金,2支票3经费本 |
+| voucherno       | String  | 否           | 支票/经费本号              |
+| amount          | Long    | 是           | 消费金额(分)             |
+| opercode        | String  | 是           | 操作员号                   |
+| credittotal     | Long    | 否           | 授信消费总额               |
+| creditpaycnt    | Integer | 否           | 授信消费次数               |
+| creditavailable | Long    | 否           | 可用授信                   |
+| creditseqno     | Integer | 否           | 授信序号                   |
+| creditflag      | Boolean | 否           | 更新授信标识               |
+| sourcetype      | String  | 否           | 消费渠道来源cardreader/pos |
+| app\_id         | String  | 是           | 应用分配id                 |
+| term\_id        | String  | 是           | 应用内部分配终端号         |
+| timestamp       | String  | 是           | 时间戳                     |
+| sign            | String  | 是           | 签名                       |
+| sign\_method    | String  | 是           | 签名方法HMAC               |
+
+签名字段termid+devphyid+termseqno+cardno+fundtype+voucherno+amount+opercode+credittotal+creditpaycnt+creditavailable+creditflag+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/charge/pos/*chargeconfirm*
+
+termid:11
+
+cardno:10
+
+fundtype:2
+
+vocherno:123
+
+amount:200
+
+opercode:099
+
+credittotal:208
+
+creditavailable:10000
+
+creditseqno:2
+
+creditflag:false
+
+sourcetype:cardreader
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“refno”:”交易参考号”,
+
+“accdate”:”记账日期”,
+
+“balance”:”账户余额”,
+
+“frozenbal”:”冻结金额”
+
+“creditline”:”授信额度”,
+
+“creditseqno”:”授信交易序号”
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.9卡片充值充正
+
+Uri: *https://ip:port/epayapi/services/charge/pos/chargereverse*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称             | 类型    | 是否必须     | 描述               |
+|------------------|---------|--------------|--------------------|
+| termid           | Integer | 是(二选一) | 设备终端号         |
+| devphyid         | String  | 是(二选一) | 设备物理id         |
+| termseqno        | Integer | 是           | 设备终端流水号     |
+| reversetermseqno | Integer | 是           | 充正终端流水号     |
+| app\_id          | String  | 是           | 应用分配id         |
+| term\_id         | String  | 是           | 应用内部分配终端号 |
+| timestamp        | String  | 是           | 时间戳             |
+| sign             | String  | 是           | 签名               |
+| sign\_method     | String  | 是           | 签名方法HMAC       |
+
+签名字段termid+devphyid+termseqno+reversetermseqno +nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/*charge/pos/chargereverse*
+
+termid:11
+
+devphyid:00000001
+
+termseqno:1
+
+reversetermseqno:10
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“termseqno”:”流水号”
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.10终端流水号查询
+
+Uri: *https://ip:port/epayapi/services/consume/term/cardpaysearch*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述                       |
+|--------------|---------|----------|----------------------------|
+| termid       | Integer | 是       | 设备终端号                 |
+| termseqno    | Integer | 是       | 终端当前流水号             |
+| sourcetype   | String  | 否       | 消费渠道来源cardreader/pos |
+| app\_id      | String  | 是       | 应用分配id                 |
+| term\_id     | String  | 是       | 应用内部分配终端号         |
+| timestamp    | String  | 是       | 时间戳                     |
+| sign         | String  | 是       | 签名                       |
+| sign\_method | String  | 是       | 签名方法HMAC               |
+
+签名字段termid+termseqno +nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/*consume/term/cardpaysearch*
+
+termid:11
+
+termseqno:1111
+
+fundtype:2
+
+sourcetype:cardreader
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“termseqno”:”终端流水号”
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.11水控流水上传
+
+Uri: *https://ip:port/epayapi/services/consume/pos/waterdtlupload*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述               |
+|--------------|---------|----------|--------------------|
+| devphyid     | String  | 是       | 设备物理id         |
+| termseqno    | Integer | 是       | 设备终端流水号     |
+| transdate    | String  | 是       | 交易日期           |
+| transtime    | String  | 是       | 交易时间           |
+| cardno       | Integer | 是       | 卡号               |
+| amount       | Long    | 是       | 消费金额(分)     |
+| available    | boolean | 是       | 是否可用           |
+| reversalflag | Boolean | 是       | 充正标识           |
+| app\_id      | String  | 是       | 应用分配id         |
+| term\_id     | String  | 是       | 应用内部分配终端号 |
+| timestamp    | String  | 是       | 时间戳             |
+| sign         | String  | 是       | 签名               |
+| sign\_method | String  | 是       | 签名方法HMAC       |
+
+签名字段devphyid+termseqno+transdate+transtime+cardno+amount+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/*waterdtlupload*
+
+devphyid:09200101
+
+termseqno:1
+
+transdate:”20150909”
+
+transtime:”050606”
+
+cardno:123
+
+amount:100
+
+available:true
+
+reversalfalg:reserval
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“termseqno”:”授信交易序号”
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.12终端设备签到
+
+Uri: *https://ip:port/epayapi/services/consume/pos/login*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述             |
+|--------------|---------|----------|------------------|
+| devphyid     | String  | 是       | 设备物理id       |
+| termtype     | String  | 是       | 终端类型,SWPOS  |
+| termdate     | String  | 是       | 交易日期         |
+| termtime     | String  | 是       | 交易时间         |
+| deviceno     | Integer | 是       | 终端机号         |
+| devseqno     | Integer | 是       | 终端流水号       |
+| termno       | String  | 是       | SAM 卡号         |
+| paraverno    | intger  | 是       | 设备参数版本号   |
+| cardverno    | String  | 是       | 黑名单版本号     |
+| feeverno     | Integer | 是       | 卡权限费率版本号 |
+| timestamp    | String  | 是       | 时间戳           |
+| sign         | String  | 是       | 签名             |
+| sign\_method | String  | 是       | 签名方法HMAC     |
+
+签名字段devphyid+termtype+deviceno+termno+paraverno+cardverno+feeverno +nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/ *login*
+
+devphyid: 09200101
+
+termtype:SWPOS
+
+termdate:20160316
+
+termtime:113545
+
+deviceno:5
+
+devseqno:0
+
+termno:100000000015
+
+paraverno:0
+
+feeverno:0
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”签到成功”,
+
+“systime”:” 20160316104034”,
+
+> "devphyid": "09200101",
+>
+> "deviceid":234,
+>
+> "paraverno":3,
+>
+> "feeverno":2,
+>
+> "cardverno":"160316000001",
+>
+> "m1key":"EDFEDE234323"
+>
+> "paragroupid":1,
+>
+> "feecfgid":3,
+>
+> "keyindex":1
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.13下载设备黑名单位图
+
+Uri: *https://ip:port/epayapi/services/consume/pos/blacklistbitmap*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述                      |
+|--------------|---------|----------|---------------------------|
+| devphyid     | String  | 是       | 设备物理id                |
+| termid       | Integer | 是       | 终端ID号                  |
+| blkindex     | Integer | 是       | 黑名单位图索引号,从0开始 |
+| cardverno    | String  | 是       | 设备黑名单版本号          |
+| app\_id      | String  | 是       | 应用分配id                |
+| term\_id     | String  | 是       | 应用内部分配终端号        |
+| timestamp    | String  | 是       | 时间戳                    |
+| sign         | String  | 是       | 签名                      |
+| sign\_method | String  | 是       | 签名方法HMAC              |
+
+签名字段devphyid+termid+blkindex+cardverno +nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/ *blacklistbitmap*
+
+devphyid:09200101
+
+termid:0
+
+blkindex:0
+
+cardverno: 160316000001
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“cardverno”:” 160316000001”,
+
+"endflag":0, // 1表示结束,0表示未结束
+
+"blkdata": "FE123DE......" //, 512 个字符
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.14增量下载黑名单
+
+Uri: *https://ip:port/epayapi/services/consume/pos/downloadblacklist*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述               |
+|--------------|---------|----------|--------------------|
+| devphyid     | String  | 是       | 设备物理id         |
+| termid       | Integer | 是       | 设备ID             |
+| cardverno    | String  | 是       | 设备黑名单版本号   |
+| maxcount     | Integer | 是       | 最大返回黑名单条数 |
+| app\_id      | String  | 是       | 应用分配id         |
+| term\_id     | String  | 是       | 应用内部分配终端号 |
+| timestamp    | String  | 是       | 时间戳             |
+| sign         | String  | 是       | 签名               |
+| sign\_method | String  | 是       | 签名方法HMAC       |
+
+签名字段devphyid+termid+cardverno+maxcount+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/ *downloadblacklist*
+
+devphyid:09200101
+
+termid:0
+
+cardverno: 160312000001
+
+maxcount:10
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+cardverno: 160316000001,
+
+count:5,
+
+blkdata:\[\[123,1\],\[3234,1\],\[5646,0\],\[76,1\],\[876,0\]\]
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.15设备心跳
+
+Uri: *https://ip:port/epayapi/services/consume/pos/heartbeat*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述                 |
+|--------------|---------|----------|----------------------|
+| devphyid     | String  | 是       | 设备物理id           |
+| termid       | Integer | 是       | 设备ID               |
+| termdate     | String  | 是       | 终端日期             |
+| termtime     | String  | 是       | 终端时间             |
+| termtype     | String  | 是       | 终端标志 SWPOS       |
+| termno       | String  | 是       | SAM卡号              |
+| devseqno     | Integer | 是       | 设备流水号           |
+| paraverno    | Integer | 是       | 系统参数版本         |
+| feeverno     | Integer | 是       | 卡权限及费率参数版本 |
+| cardverno    | String  | 是       | 黑名单版本号         |
+| app\_id      | String  | 是       | 应用分配id           |
+| term\_id     | String  | 是       | 应用内部分配终端号   |
+| timestamp    | String  | 是       | 时间戳               |
+| sign         | String  | 是       | 签名                 |
+| sign\_method | String  | 是       | 签名方法HMAC         |
+
+签名字段devphyid+termid+paraverno+feeverno+cardverno+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/ *heartbeat*
+
+devphyid:09200101
+
+termid:0
+
+termdate:20160316
+
+termtime:113545
+
+termtype:SWPOS
+
+termno: 100000000015
+
+devseqno:45
+
+paraverno:3
+
+feeverno:4
+
+cardverno: 160316000001
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+"devphyid":"09200101",
+
+"systime":"20160316132234",
+
+"deviceid":123,
+
+"paraverno":4,
+
+"paragroupid":1,
+
+"feeverno":3,
+
+"feecfgid":4,
+
+"cardverno": "160316000001"
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.16下载设备参数
+
+Uri: *https://ip:port/epayapi/services/consume/pos/updatesyspara*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述               |
+|--------------|---------|----------|--------------------|
+| devphyid     | String  | 是       | 设备物理id         |
+| termid       | Integer | 是       | 设备ID             |
+| termdate     | String  | 是       | 终端日期           |
+| termtime     | String  | 是       | 终端时间           |
+| termtype     | String  | 是       | 终端标识, SWPOS    |
+| paragroupid  | Integer | 是       | 参数组号           |
+| classname    | String  | 是       | 参数分类, syspara |
+| app\_id      | String  | 是       | 应用分配id         |
+| term\_id     | String  | 是       | 应用内部分配终端号 |
+| timestamp    | String  | 是       | 时间戳             |
+| sign         | String  | 是       | 签名               |
+| sign\_method | String  | 是       | 签名方法HMAC       |
+
+签名字段devphyid+termid+paragroupid+classname+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/ *updatesyspara*
+
+devphyid:09200101
+
+termid:0
+
+termsdate:”20150909”
+
+termtime:”050606”
+
+termtype:"SWPOS"
+
+paragroupid:2
+
+classname:"syspara"
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+"syspara":\[\[ "day\_limit", 5000\], \["max\_cardbal ", 99999\]\],
+
+"paraverno":4,
+
+"paragroupid":2
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.17下载设备卡权限费率
+
+Uri: *https://ip:port/epayapi/services/consume/pos/updatefeecfg*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述               |
+|--------------|---------|----------|--------------------|
+| devphyid     | String  | 是       | 设备物理id         |
+| termid       | Integer | 是       | 设备ID             |
+| devcfgverno  | Integer | 是       | 设备参数版本       |
+| app\_id      | String  | 是       | 应用分配id         |
+| term\_id     | String  | 是       | 应用内部分配终端号 |
+| timestamp    | String  | 是       | 时间戳             |
+| sign         | String  | 是       | 签名               |
+| sign\_method | String  | 是       | 签名方法HMAC       |
+
+签名字段devphyid+termid+devcfgverno+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/*updatefeecfg*
+
+devphyid:09200101
+
+devcfgverno:4
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+"cfgverno":6,
+
+"feecfg":\[\[10,100\],\[11,110\],\[15,90\],\[16,100\]\]
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 2.18 B Mode 消费流水上传
+
+Uri: *https://ip:port/epayapi/services/consume/pos/bmodeuploadrecord*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称          | 类型    | 是否必须 | 描述                                                 |
+|---------------|---------|----------|------------------------------------------------------|
+| devphyid      | String  | 是       | 设备物理id                                           |
+| termseqno     | Integer | 是       | 设备终端流水号                                       |
+| transdate     | String  | 是       | 交易日期                                             |
+| transtime     | String  | 是       | 交易时间                                             |
+| cardno        | Integer | 是       | 卡号                                                 |
+| amount        | Long    | 是       | 交易金额(分)                                       |
+| payamt        | Long    | 是       | 实际扣款金额(分)                                   |
+| cardbefbal    | Long    | 是       | 卡交易前余额(分)                                   |
+| cardaftbal    | Long    | 是       | 卡交易后余额(分)                                   |
+| feeamt        | Long    | 是       | 折扣/搭伙费金额(分)                                |
+| paycnt        | Integer | 是       | 卡交易前次数                                         |
+| withpasswd    | Boolean | 是       | 是否启用密码消费                                     |
+| termno        | String  | 是       | SAM卡号                                              |
+| tac           | String  | 是       | Tac                                                  |
+| datatype      | String  | 是       | 记录类型10-正常,20-带搭伙费,30-带折扣,80-锁卡流水 |
+| sendtype      | Integer | 是       | 交易模式,2-批上送                                   |
+| updresult     | Integer | 是       | 写卡结果,9-写卡成功,2-中途拔卡,0-未写卡           |
+| lasttranstime | String  | 否       | 上笔交易日期时间                                     |
+| lasttermno    | String  | 否       | 上一笔交易终端                                       |
+| lastamt       | Long    | 否       | 上一笔交易金额                                       |
+| lasttranscnt  | Integer | 否       | 上一笔交易前次数                                     |
+| lasttransflag | Integer | 否       | 上一笔交易标识                                       |
+| app\_id       | String  | 是       | 应用分配id                                           |
+| term\_id      | String  | 是       | 应用内部分配终端号                                   |
+| timestamp     | String  | 是       | 时间戳                                               |
+| sign          | String  | 是       | 签名                                                 |
+| sign\_method  | String  | 是       | 签名方法HMAC                                         |
+
+签名字段devphyid+termseqno+transdate+transtime+cardno+amount+paycnt+cardbefbal
+
++cardaftbal+withpasswd+datatype+updresult+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/pos/ *bmodeuploadrecord*
+
+devphyid:09200101
+
+termseqno:1
+
+transdate:”20150909”
+
+transtime:”050606”
+
+cardno:123
+
+amount:1000
+
+payamt:1100
+
+cardbefbal:5000
+
+cardaftbal:3900
+
+feeamt:100
+
+paycnt:5
+
+withpasswd:0
+
+termno:100000000015
+
+tac:ABCD45ED
+
+datatype:20
+
+sendtype:2
+
+updresult:9
+
+lasttranstime:20150908181223
+
+lasttermno:100000000231
+
+lastamt:500
+
+lasttranscnt:4
+
+lasttransflag:6app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“termseqno”:”交易序号”
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+### 3.多媒体对接功能入口
+#### 3.1充值初始化
+
+Uri: *https://ip:port/epayapi/services/charge/dmtqc/init*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述               |
+|--------------|---------|----------|--------------------|
+| termid       | Integer | 是       | 设备终端号         |
+| termseqno    | Integer | 是       | 设备终端流水号     |
+| cardno       | Integer | 是       | 卡号               |
+| amount       | Long    | 是       | 消费金额(分)     |
+| app\_id      | String  | 是       | 应用分配id         |
+| term\_id     | String  | 是       | 应用内部分配终端号 |
+| timestamp    | String  | 是       | 时间戳             |
+| sign         | String  | 是       | 签名               |
+| sign\_method | String  | 是       | 签名方法HMAC       |
+
+签名字段termid +termseqno+cardno+amount+nTimestamp+session\_key
+
+例子:
+
+URI:*https://ip:port/epayapi/services/charge/dmtqc/init*
+
+termid:10000014
+
+termseqno:”1”
+
+cardno:”12312”
+
+amount:”104”
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:”初始化成功”,*
+>
+> *“refno”:”20140809120901000001”*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 3.2圈存充值
+
+Uri: *https://ip:port/epayapi/services/charge/dmtqc/transfer*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述               |
+|--------------|---------|----------|--------------------|
+| termid       | Integer | 是       | 设备终端号         |
+| refno        | String  | 是       | 参考号             |
+| cardno       | Integer | 是       | 卡号               |
+| amount       | Long    | 是       | 消费金额(分)     |
+| app\_id      | String  | 是       | 应用分配id         |
+| term\_id     | String  | 是       | 应用内部分配终端号 |
+| timestamp    | String  | 是       | 时间戳             |
+| sign         | String  | 是       | 签名               |
+| sign\_method | String  | 是       | 签名方法HMAC       |
+
+签名字段termid+refno+ cardno+amount+nTimestamp+session\_key
+
+例子:
+
+URI:*https://ip:port/epayapi/services/charge/dmtqc/transfer*
+
+termid:10000014
+
+refno:”20040000100200102001”
+
+cardno:”12312”
+
+amount:”104”
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:” 支付请求已接收”,*
+>
+> *“refno”:”20140809120901000001”*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 3.3圈存充值结果查询
+
+Uri: *https://ip:port/epayapi/services/charge/dmtqc/resultquery*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述               |
+|--------------|---------|----------|--------------------|
+| termid       | Integer | 是       | 设备终端号         |
+| refno        | String  | 是       | 参考号             |
+| app\_id      | String  | 是       | 应用分配id         |
+| term\_id     | String  | 是       | 应用内部分配终端号 |
+| timestamp    | String  | 是       | 时间戳             |
+| sign         | String  | 是       | 签名               |
+| sign\_method | String  | 是       | 签名方法HMAC       |
+
+签名字段termid+refno+ cardno+amount+nTimestamp+session\_key
+
+例子:
+
+URI:*https://ip:port/epayapi/services/charge/dmtqc/resultquery*
+
+termid:10000014
+
+refno:”20040000100200102001”
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:”交易成功”,*
+>
+> *“refno”:”20140809120901000001”*
+>
+> *“successtime”:2014-05-05 10:43:29*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 3.4终端在线消费(第三方/多媒体)
+
+Uri: *https://ip:port/epayapi/services/consume/dmtterm/cardpay*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称            | 类型    | 是否必须     | 描述                                |
+|-----------------|---------|--------------|-------------------------------------|
+| termid          | Integer | 是(二选一) | 设备终端号                          |
+| devphyid        | String  | 是(二选一) | 设备物理id                          |
+| termseqno       | Integer | 是           | 设备终端流水号                      |
+| cardno          | Integer | 是           | 卡号                                |
+| amount          | Long    | 是           | 消费金额(分)                      |
+| managefee       | Long    | 否           | 管理费(分)                        |
+| managefeetype   | String  | 否           | 管理费类型(discont,mealer,none,…) |
+| credittotal     | Long    | 否           | 授信消费总额                        |
+| creditpaycnt    | Integer | 否           | 授信消费次数                        |
+| creditavailable | Long    | 否           | 可用授信                            |
+| creditseqno     | Integer | 否           | 授信序号                            |
+| creditflag      | Boolean | 否           | 更新授信标识                        |
+| shopid          | Integer | 否           | 商户号(只有多媒体启用)            |
+| sourcetype      | String  | 否           | 消费渠道来源cardreader/pos/dmt      |
+| app\_id         | String  | 是           | 应用分配id                          |
+| term\_id        | String  | 是           | 应用内部分配终端号                  |
+| timestamp       | String  | 是           | 时间戳                              |
+| sign            | String  | 是           | 签名                                |
+| sign\_method    | String  | 是           | 签名方法HMAC                        |
+
+签名字段termid+devphyid+termseqno+cardno+amount+managefee+managefeetype+credittotal+creditpaycnt+creditavailable+creditflag+shopid+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/dmtterm/*cardpay*
+
+termid:11
+
+devphyid:00000001
+
+termseqno:1
+
+cardno:10
+
+amount:200
+
+managefee:0
+
+managefeetype:none
+
+credittotal:208
+
+creditavailable:10000
+
+creditseqno:2
+
+creditflag:false
+
+shopid:111
+
+sourcetype:pos
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“refno”:”交易参考号”,
+
+“accdate”:”记账日期”,
+
+“balance”:”账户余额”,
+
+“creditline”:”授信额度”,
+
+“creditseqno”:”授信交易序号”,
+
+“needpwdconfirm”:true
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+Needpwdconfirm 如果交易金额超过单日累计或者单次限额,标识为true,需要密码确认,交易暂未成功,需要输入密码成功发送成功交易确认才完成交易。(目前只有需要pos输入密码)
+
+#### 3.5终端在线消费充正
+
+Uri: *https://ip:port/epayapi/services/consume/dmtterm/cardpayreverse*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称             | 类型    | 是否必须     | 描述               |
+|------------------|---------|--------------|--------------------|
+| termid           | Integer | 是(二选一) | 设备终端号         |
+| devphyid         | String  | 是(二选一) | 设备物理id         |
+| termseqno        | Integer | 是           | 设备终端流水号     |
+| reversetermseqno | Integer | 是           | 充正终端流水号     |
+| app\_id          | String  | 是           | 应用分配id         |
+| term\_id         | String  | 是           | 应用内部分配终端号 |
+| timestamp        | String  | 是           | 时间戳             |
+| sign             | String  | 是           | 签名               |
+| sign\_method     | String  | 是           | 签名方法HMAC       |
+
+签名字段termid+devphyid+termseqno+reversetermseqno +nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/dmtterm/*cardpayreverse*
+
+termid:11
+
+devphyid:00000001
+
+termseqno:1
+
+reversetermseqno:10
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“termseqno”:”流水号”
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+#### 3.6水控转账(多媒体)
+
+Uri: *https://ip:port/epayapi/services/consume/dmtterm/watertrans*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称            | 类型    | 是否必须     | 描述                                |
+|-----------------|---------|--------------|-------------------------------------|
+| termid          | Integer | 是(二选一) | 设备终端号                          |
+| devphyid        | String  | 是(二选一) | 设备物理id                          |
+| termseqno       | Integer | 是           | 设备终端流水号                      |
+| cardno          | Integer | 是           | 卡号                                |
+| amount          | Long    | 是           | 消费金额(分)                      |
+| managefee       | Long    | 否           | 管理费(分)                        |
+| managefeetype   | String  | 否           | 管理费类型(discont,mealer,none,…) |
+| credittotal     | Long    | 否           | 授信消费总额                        |
+| creditpaycnt    | Integer | 否           | 授信消费次数                        |
+| creditavailable | Long    | 否           | 可用授信                            |
+| creditseqno     | Integer | 否           | 授信序号                            |
+| creditflag      | Boolean | 否           | 更新授信标识                        |
+| shopid          | Integer | 否           | 商户号(只有多媒体启用)            |
+| sourcetype      | String  | 否           | 消费渠道来源cardreader/pos/dmt      |
+| app\_id         | String  | 是           | 应用分配id                          |
+| term\_id        | String  | 是           | 应用内部分配终端号                  |
+| timestamp       | String  | 是           | 时间戳                              |
+| sign            | String  | 是           | 签名                                |
+| sign\_method    | String  | 是           | 签名方法HMAC                        |
+
+签名字段termid+devphyid+termseqno+cardno+amount+managefee+managefeetype+credittotal+creditpaycnt+creditavailable+creditflag+shopid+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/dmtterm/*cardpay*
+
+termid:11
+
+devphyid:00000001
+
+termseqno:1
+
+cardno:10
+
+amount:200
+
+managefee:0
+
+managefeetype:none
+
+credittotal:208
+
+creditavailable:10000
+
+creditseqno:2
+
+creditflag:false
+
+shopid:111
+
+sourcetype:pos
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+“refno”:”交易参考号”,
+
+“accdate”:”记账日期”,
+
+“balance”:”账户余额”,
+
+“creditline”:”授信额度”,
+
+“creditseqno”:”授信交易序号”,
+
+“needpwdconfirm”:true
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+Needpwdconfirm 如果交易金额超过单日累计或者单次限额,标识为true,需要密码确认,交易暂未成功,需要输入密码成功发送成功交易确认才完成交易。(目前只有需要pos输入密码)
+
+#### 3.7水控转账小钱包写卡确认(多媒体)
+
+Uri: *https://ip:port/epayapi/services/consume/dmtterm/waterconfirm*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须     | 描述               |
+|--------------|---------|--------------|--------------------|
+| termid       | Integer | 是(二选一) | 设备终端号         |
+| devphyid     | String  | 是(二选一) | 设备物理id         |
+| refno        | String  | 是           | 转账流水号         |
+| cardno       | Integer | 是           | 卡号               |
+| pursetype    | Short   | 是           | 水控钱包类型       |
+| waterisok    | Boolean | 是           | 水控是否成功       |
+| waterisbreak | Boolean | 是           | 水控是否中途拔卡   |
+| app\_id      | String  | 是           | 应用分配id         |
+| term\_id     | String  | 是           | 应用内部分配终端号 |
+| timestamp    | String  | 是           | 时间戳             |
+| sign         | String  | 是           | 签名               |
+| sign\_method | String  | 是           | 签名方法HMAC       |
+
+签名字段termid+devphyid+refno+cardno+waterisok+waterisbereak+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/dmtterm/*waterconfirm*
+
+termid:11
+
+devphyid:00000001
+
+refno:20150902010201201
+
+cardno:10
+
+waterisok:true
+
+waterisbreak:false
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”交易成功”,
+
+}
+
+备注:retcode=0为正常,其他非0为错误
+
+### 4.支付宝前置对接功能入口
+#### 4.1支付宝充值初始化
+
+Uri: *https://ip:port/epayapi/services/charge/alipay/init*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型   | 是否必须 | 描述               |
+|--------------|--------|----------|--------------------|
+| stuempno     | String | 是       | 学工号             |
+| amount       | Long   | 是       | 消费金额(分)     |
+| app\_id      | String | 是       | 应用分配id         |
+| term\_id     | String | 是       | 应用内部分配终端号 |
+| timestamp    | String | 是       | 时间戳             |
+| sign         | String | 是       | 签名               |
+| sign\_method | String | 是       | 签名方法HMAC       |
+
+签名字段stuempno+amount+nTimestamp+session\_key
+
+例子:
+
+URI:*https://ip:port/epayapi/services/charge/alipay/init*
+
+stuempno:901920
+
+amount:”104”
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:” 初始化成功”,*
+>
+> *“refno”:”20140809120901000001”*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 4.2支付宝充值确认
+
+Uri: *https://ip:port/epayapi/services/charge/alipay/confirm*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型   | 是否必须 | 描述               |
+|--------------|--------|----------|--------------------|
+| stuempno     | String | 是       | 学工号             |
+| refno        | String | 是       | 交易参考号         |
+| amount       | Long   | 是       | 消费金额(分)     |
+| app\_id      | String | 是       | 应用分配id         |
+| term\_id     | String | 是       | 应用内部分配终端号 |
+| timestamp    | String | 是       | 时间戳             |
+| sign         | String | 是       | 签名               |
+| sign\_method | String | 是       | 签名方法HMAC       |
+
+签名字段stuempno+refno+amount+nTimestamp+session\_key
+
+例子:
+
+URI:*https://ip:port/epayapi/services/charge/alipay/confirm*
+
+stuempno:901920
+
+refno:2015098309283930921
+
+amount:”104”
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:” 支付确认已接受”,*
+>
+> *“refno”:”20140809120901000001”*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+### 5. 第三方对接功能
+#### 5.1换卡初始化
+
+Uri: *https://ip:port/epayapi/services/consume/zzsb/init*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型   | 是否必须 | 描述               |
+|--------------|--------|----------|--------------------|
+| idno         | String | 是       | 身份证号           |
+| app\_id      | String | 是       | 应用分配id         |
+| term\_id     | String | 是       | 应用内部分配终端号 |
+| timestamp    | String | 是       | 时间戳             |
+| sign         | String | 是       | 签名               |
+| sign\_method | String | 是       | 签名方法HMAC       |
+|              |        |          |                    |
+
+签名字段idno+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/zzsb/init
+
+idno:210201929309389922
+
+app\_id:15089039087
+
+term\_id:01
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:2015-01-19 13:09:01
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”初始化成功”
+
+“oldcardno”:”老卡卡号”
+
+“stuempno”:”学号”
+
+“custname”:”姓名”
+
+“feetype”:40
+
+“feeamt”:”20.00”
+
+“expiredate”:”20150909”
+
+}
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 5.2换卡请求
+
+Uri: *https://ip:port/epayapi/services/consume/zzsb/renewcard*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称            | 类型   | 是否必须 | 描述               |
+|-----------------|--------|----------|--------------------|
+| opercode        | String | 是       | 操作员号           |
+| checksum        | String | 是       | 校验码             |
+| operseqno       | String | 是       | 操作员流水号       |
+| oldcardno       | String | 是       | 老卡卡号           |
+| newcardphyid    | String | 是       | 新卡物理卡号       |
+| cardphytypecode | String | 是       | 卡物理类型         |
+| feeamt          | String | 是       | 卡成本费           |
+| app\_id         | String | 是       | 应用分配id         |
+| term\_id        | String | 是       | 应用内部分配终端号 |
+| timestamp       | String | 是       | 时间戳             |
+| sign            | String | 是       | 签名               |
+| sign\_method    | String | 是       | 签名方法HMAC       |
+|                 |        |          |                    |
+
+签名字段opercode+checksum+operseqno+oldcardno+newcardphyid+cardphytypecode+feeamt +nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/zzsb/renewcard
+
+opercode:6666
+
+checksum:1920
+
+operseqno:1029932929
+
+oldcardno:1000092
+
+newcardphyid:0D908A11
+
+cardphytypecode:257
+
+feeamt:2000
+
+app\_id:15089039087
+
+term\_id:01
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:2015-01-19 13:09:01
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”补办成功”
+
+"accdate":"日期";
+
+> "refno":"参考号";
+>
+> "amount":"金额";
+>
+> "feeamt":"收费费用";
+>
+> "hostdate":"主机日期";
+>
+> "hosttime":"主机时间";
+>
+> "feetype":"收费类别";
+>
+> "expiredate":"过期日期";
+>
+> "cardno":"卡号";
+>
+> "cardtype":"卡类别";
+>
+> "showcardno":"显示卡号";
+>
+> "cardverno":"黑名单版本号";
+>
+> "cardpwd":"卡密码";
+>
+> "custid":"客户号";
+>
+> "country":"国籍";
+>
+> "nation":"民族";
+>
+> "areacode":"校区";
+>
+> "custtype":"客户类别";
+>
+> "custname":"客户名";
+>
+> "stuempno":"学号";
+>
+> "deptcode":"部门";
+>
+> "idtype":"证件类型";
+>
+> "idno":"证件号";
+>
+> "sex":"性别";
+>
+> "singlemaxamt":"单次限额";
+>
+> "daymaxamt":"单日限额";
+
+}
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 5.3换卡确认
+
+Uri: *https://ip:port/epayapi/services/consume/zzsb/renewcardconfirm*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型    | 是否必须 | 描述               |
+|--------------|---------|----------|--------------------|
+| opercode     | String  | 是       | 操作员号           |
+| checksum     | String  | 是       | 校验码             |
+| refno        | String  | 是       | 参考号             |
+| isok         | Boolean | 是       | 是否写卡成功       |
+| app\_id      | String  | 是       | 应用分配id         |
+| term\_id     | String  | 是       | 应用内部分配终端号 |
+| timestamp    | String  | 是       | 时间戳             |
+| sign         | String  | 是       | 签名               |
+| sign\_method | String  | 是       | 签名方法HMAC       |
+|              |         |          |                    |
+
+签名字段opercode+checksum+refno+isok+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/consume/zzsb/renewcardconfirm
+
+opercode:6666
+
+checksum:1920
+
+refno:1000092123124123123
+
+isok:true
+
+app\_id:15089039087
+
+term\_id:01
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:2015-01-19 13:09:01
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+“retcode”:0,
+
+“retmsg”:”确认成功”
+
+}
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 5.4取照片
+
+Uri: *https://ip:port/epayapi/services/photoservice/getphoto/base64/{idno}*
+
+请求格式:text/plain
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型   | 是否必须 | 描述               |
+|--------------|--------|----------|--------------------|
+| idno         | String | 是       | 身份证号           |
+| app\_id      | String | 是       | 应用分配id         |
+| term\_id     | String | 是       | 应用内部分配终端号 |
+| timestamp    | String | 是       | 时间戳             |
+| sign         | String | 是       | 签名               |
+| sign\_method | String | 是       | 签名方法HMAC       |
+|              |        |          |                    |
+
+签名字段idno+nTimestamp+session\_key
+
+例子:
+
+URI:https://ip:port/epayapi/services/*photoservice/getphoto/base64/{idno}*
+
+idno:1000092123124123123
+
+app\_id:15089039087
+
+term\_id:01
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:2015-01-19 13:09:01
+
+返回:
+
+> 返回格式:text/plain
+
+{
+
+“retcode”:0,
+
+“retmsg”:”确认成功”
+
+“photo”:”base64 数据”
+
+}
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+### 6.车载机功能入口
+#### 6.1车载机获取url二维码
+
+Uri: *https://ip:port/epayapi/services/carpos/geturlcode*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型   | 是否必须     | 描述               |
+|--------------|--------|--------------|--------------------|
+| termid       | String | 是(二选一) | 终端id             |
+| devphyid     | String | 是           | 设备物理id         |
+| merchaccno   | String | 是           | 商户号             |
+| amount       | Long   | 是           | 消费金额(分)     |
+| app\_id      | String | 是           | 应用分配id         |
+| term\_id     | String | 是           | 应用内部分配终端号 |
+| timestamp    | String | 是           | 时间戳             |
+| sign         | String | 是           | 签名               |
+| sign\_method | String | 是           | 签名方法HMAC       |
+
+签名字段termid+devphyid+merchaccno+amount+nTimestamp+session\_key
+
+例子:
+
+URI:*https://ip:port/epayapi/services/carpos/geturlcode*
+
+termid:901920
+
+devphyid:12312
+
+merchaccno:10929
+
+amount:”104”
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:” success”,*
+>
+> *“url”:”http://102.29.20.10/epayapi/service/carpos/pay/init/base64串”*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+#### 6.2车载机二维码支付
+
+Uri: *https://ip:port/epayapi/services/carpos/pay/init/{reqdata}*
+
+请求格式:application/x-www-form-urlencoded
+
+请求方式:post
+
+参数:
+
+| 名称         | 类型   | 是否必须 | 描述               |
+|--------------|--------|----------|--------------------|
+| gid          | String | 是       | 终端编号           |
+| reqdata      | String | 是       | 请求数据内容       |
+| app\_id      | String | 是       | 应用分配id         |
+| term\_id     | String | 是       | 应用内部分配终端号 |
+| timestamp    | String | 是       | 时间戳             |
+| sign         | String | 是       | 签名               |
+| sign\_method | String | 是       | 签名方法HMAC       |
+
+签名字段termid+devphyid+amount+nTimestamp+session\_key
+
+例子:
+
+URI:*https://ip:port/epayapi/services/carpos/pay/init/{reqdata}*
+
+gid:901920
+
+reqdata:ksjfijsalkjflksajdfl
+
+app\_id:15089039087
+
+sign:a910bba901d9919c
+
+sing\_method:HMAC
+
+timestamp:20150119130901
+
+返回:
+
+> 返回格式:application/json
+
+{
+
+> *“retcode“:0,*
+>
+> *“retmsg“:” success”,*
+>
+> *“refno”:”20159120392839129”*
+
+}
+
+> **异常信息:**
+
+| HTTP 错误码 | 英文索引         | 中文消息                              |
+|-------------|------------------|---------------------------------------|
+| 400         | SC\_BAD\_REQUEST | 请求信息不完整                        |
+| 400         | SC\_BAD\_REQUEST | 请求时间戳错误,格式为:yyyyMMddHHmmss |
+| 401         | SC\_UNAUTHORIZED | 密码验证错误                          |
+
+
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\224\265\346\216\247\345\257\271\346\216\245\345\211\215\347\275\256\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\224\265\346\216\247\345\257\271\346\216\245\345\211\215\347\275\256\346\216\245\345\217\243\346\226\207\346\241\243.md"
index a983873..9e8f535 100644
--- "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\224\265\346\216\247\345\257\271\346\216\245\345\211\215\347\275\256\346\216\245\345\217\243\346\226\207\346\241\243.md"
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\224\265\346\216\247\345\257\271\346\216\245\345\211\215\347\275\256\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -215,7 +215,11 @@
 	- buiId - 楼栋ID
 	- roomId - 房间ID
 	- roomName - 房间名
-	- restElecDegree - 剩余电量
+	- restElecDegree - 剩余电量 (总电量)
+	- degreelist - list:一房多表的集合
+		- elecode - 电表代码
+		- name - 名称。照明、空调等
+		- restElecDegree 剩余电量
 
 ```json
 {
@@ -226,7 +230,16 @@
     			"buiId":"20",
     			"roomId":"2010",
     			"roomName":"2010室",
-    			"restElecDegree":12.0
+    			"restElecDegree":12.0,
+    			"degreelist":[{
+    				"elecode":"lighting",
+    				"name":"照明",
+    				"restElecDegree":8.0
+    			},{
+    				"airConditioner":"lighting",
+    				"name":"空调",
+    				"restElecDegree":4.0
+    			}]
     		 }
 }
 ```
@@ -243,6 +256,7 @@
 - `area`   - 查询校区返回的areaId
 - `bui` - 查询楼栋返回的buiId
 - `room` - 查询房间返回的roomId
+- `elecode ` - 电表代码。可以为空(不分电表时),一房多表时据此区分不同电表充值
 - `cust` - 客户唯一号 (兼容以前版本),空时填0
 - `custid` - 系统唯一号,客户号(与stuempno,可选),空时填0
 - `stuempno` - 系统唯一号,学工号(与custid,可选),空时填0
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\254\254\344\270\211\346\226\271\346\225\260\346\215\256\345\257\271\346\216\245\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\254\254\344\270\211\346\226\271\346\225\260\346\215\256\345\257\271\346\216\245\346\216\245\345\217\243\346\226\207\346\241\243.md"
index b41dbbb..d271d06 100644
--- "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\254\254\344\270\211\346\226\271\346\225\260\346\215\256\345\257\271\346\216\245\346\216\245\345\217\243\346\226\207\346\241\243.md"
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\254\254\344\270\211\346\226\271\346\225\260\346\215\256\345\257\271\346\216\245\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -584,7 +584,7 @@
 
 **请求URL:**
 
-- `https://ip:port/epayapi/services/thirdparty/common/getbilldata`
+- `http(s)://ip:port/epayapi/services/thirdparty/common/getbilldata`
 
 **请求方式/格式:** 
 
@@ -603,20 +603,21 @@
 |enddate|String|是|	结束日期 格式yyyyMMdd|
 |timestamp|String|是|时间戳格式为yyyyMMddhh24miss|
 |sign|String|是|	签名|
-|sign_method|String|是|参数的加密方法选择,可选值是:HMAC 加密方式为HAMC-SHA1|
+|sign_method|String|是| HMAC 加密方式为HAMC-SHA1|
 
 **请求内容示例:**
-```html
-URI:https://ip:port/epayapi/services/thirdparty/common/getbilldata
+```
 
-partner_id:10000
-pageno:1
-pagesize:10
-startdate:20150829
-enddate:20150929
-timestamp:20150119130901
-sign:5195f9b9116e4adf67eeebc9935d33dc683f677d
-sign_method:HMAC
+- URI:http(s)://ip:port/epayapi/services/thirdparty/common/getbilldata
+- partner_id:10000
+- pageno:1
+- pagesize:10
+- startdate:20150829
+- enddate:20150929
+- timestamp:20150119130901
+- sign:5195f9b9116e4adf67eeebc9935d33dc683f677d
+- sign_method:HMAC
+
 ```
 
 **返回示例:**
@@ -625,65 +626,120 @@
 
 ```json
 {
-{
     "retcode": "0",
     "retmsg": "查询成功",
     "data": {
-        "totalCount": 3,
+        "totalCount": 11,
         "pageSize": 10,
         "pageNo": 1,
         "list": [
             {
-                "refno": "20151015111200029503",
-                "paytime": "20151015111223",
-                "billname": "悦校现金补助",
-                "amount": 283,
-                "billtype": "下发补助",
+                "refno": "20170809160440168058",
+                "paytime": "20170809160449",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
                 "billstatus": 2,
-                "expiredate": null,
-                "tradetype": "1",
-                "tradecode": "3130"
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机1"
             },
             {
-                "refno": "20151013191000028629",
-                "paytime": "20151013191031",
-                "billname": "悦校现金补助",
-                "amount": 283,
-                "billtype": "下发补助",
+                "refno": "20170809103401168050",
+                "paytime": "20170809103413",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
                 "billstatus": 2,
-                "expiredate": null,
-                "tradetype": "1",
-                "tradecode": "3130"
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机3"
             },
             {
-                "refno": "20151013184200027918",
-                "paytime": "20151013184230",
-                "billname": "悦校现金补助",
-                "amount": 283,
-                "billtype": "下发补助",
+                "refno": "20170809101226168047",
+                "paytime": "20170809101238",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
                 "billstatus": 2,
-                "expiredate": null,
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机2"
+            },
+            {
+                "refno": "20170809101217168046",
+                "paytime": "20170809101229",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
+                "billstatus": 2,
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机1"
+            },
+            {
+                "refno": "20170809100854168045",
+                "paytime": "20170809100905",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
+                "billstatus": 2,
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机1"
+            },
+            {
+                "refno": "20170809100845168043",
+                "paytime": "20170809100824",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费",
+                "billstatus": 2,
+                "tradetype": "2",
+                "tradecode": "6630",
+                "termname":"第一食堂POS机1"
+            },
+            {
+                "refno": "20170809100845168044",
+                "paytime": "20170809100824",
+                "billname": "IC卡消费",
+                "amount": 1,
+                "billtype": "联机刷卡消费撤销",
+                "billstatus": 2,
                 "tradetype": "1",
-                "tradecode": "3130"
+                "tradecode": "6632",
+                "termname":"第一食堂POS机1"
+            },
+            {
+                "refno": "20170807145900002705",
+                "paytime": "20170807145958",
+                "billname": "现金充值",
+                "amount": 270,
+                "billtype": "钱包充值",
+                "billstatus": 2,
+                "tradetype": "1",
+                "tradecode": "6500",
+                "termname":"第一食堂充值机1"
             }
         ],
         "firstResult": 0,
-        "totalPage": 1,
-        "lastPage": true,
-        "nextPage": 1,
-        "prePage": 1,
-        "firstPage": true
+        "totalPage": 2,
+        "firstPage": true,
+        "lastPage": false,
+        "nextPage": 2,
+        "prePage": 1
     }
 }
-
 ```
 
 - 失败
 
 ```json
 {
-	"retcode":"1",
-	"retmsg":"查询失败"
+    "retcode": "304",
+    "retmsg": "签名验证失败",
+    "data": null
+}
 
 ```
 
@@ -693,9 +749,247 @@
 |-----|-----|------|
 |retcode|String|返回码(0=成功,其他为失败)|
 |retmsg|String|返回消息|
-|refno|String|交易参考号|
-|billname|String|交易名称|
+|data|list|流水明细集合|
+
+**流水明细说明:**
+
+|参数名 | 类型 | 说明 |
+|-----|-----|------|
+| refno |String|交易参考号|
+| paytime|String|交易时间 yyyyMMddhh24miss|
+| billname|String |交易名称 |
+|amount|Integer|交易金额(元)|
 |billtype|String|交易类型|
-|amount|Integer|交易金额(分)|
 |billstatus|String|状态 2-成功 3-失败|
-|tradetype|String|交易方向 1-充值 2-消费|
+| tradetype |String|交易方向 1-充值 2-消费|
+|tradecode|String|交易码|
+|termname | String|终端名称|
+
+
+
+## 签名计算 ##
+
+
+* 除sign和参数值为空以外的参数都要参与签名
+* 以参数名按字母排序并以key=value的形式以&符号连接得到加密字符串
+* 以约定的秘钥对加密字符串进行加密,加密方式为HAMC-SHA1
+
+**示例**
+
+- partner_id: 100004
+- stuempno: 10000035
+- timestamp: 20170810153811
+- sign_method: HMAC
+- sign:42fa845499384b830b774caf423c2fedd43f0b23
+
+- 加密字符串: partner_id=100004&sign_method=HMAC&stuempno=10000035&timestamp=20170810153811
+
+
+
+
+## 2.4 卡片挂失 ##
+
+**请求URL:**
+
+- `http(s)://ip:port/epayapi/services/thirdparty/common/cardloss`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+|参数名 | 类型 | 必选 | 说明 |
+|-----|------|-----|------|
+|partner_id|String|是      |本系统分配给各个接入应用的合作伙伴id号|
+|stuempno|String|否*|挂失对象的学工号。与卡片物理ID必传一项|
+|cardphyid|String|否*|卡片物理ID,读卡得到。与学工号选其一即可,都传默认学工号为主|
+|timestamp|String|是|时间戳格式为yyyyMMddhh24miss|
+|sign|String|是|	签名|
+|sign_method|String|是|固定填: HMAC (加密方式为HAMC-SHA1)|
+
+**请求内容示例:**
+```
+
+- URI:http(s)://ip:port/epayapi/services/thirdparty/common/cardloss
+- partner_id:10000
+- stuempno:09893092
+- timestamp:20150119130901
+- sign:5195f9b9116e4adf67eeebc9935d33dc683f677d
+- sign_method:HMAC
+
+```
+
+**返回示例:**
+
+- 成功
+
+```json
+{
+    "retcode": "0",
+    "retmsg": "成功",
+}
+
+```
+
+- 失败
+
+```json
+{
+    "retcode": "51",
+    "retmsg": "卡已挂失"
+}
+
+```
+
+**返回参数说明:**
+
+|参数名 | 类型 | 说明 |
+|-----|-----|------|
+|retcode|String|返回码(0=成功,其他为失败)|
+|retmsg|String|返回消息|
+
+## 2.5 账户余额查询 ##
+
+**请求URL:**
+
+- `http(s)://ip:port/epayapi/services/thirdparty/common/accountquery`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+|参数名 | 类型 | 必选 | 说明 |
+|-----|------|-----|------|
+|partner_id|String|是      |本系统分配给各个接入应用的合作伙伴id号|
+|stuempno|String|否*|挂失对象的学工号。与卡片物理ID必传一项|
+|cardphyid|String|否*|卡片物理ID,读卡得到。与学工号选其一即可,都传默认学工号为主|
+|timestamp|String|是|时间戳格式为yyyyMMddhh24miss|
+|sign|String|是|	签名|
+|sign_method|String|是|固定填: HMAC (加密方式为HAMC-SHA1)|
+
+**请求内容示例:**
+```
+
+- URI:http(s)://ip:port/epayapi/services/thirdparty/common/accountquery
+- partner_id:10000
+- stuempno:09893092
+- timestamp:20150119130901
+- sign:5195f9b9116e4adf67eeebc9935d33dc683f677d
+- sign_method:HMAC
+
+```
+
+**返回示例:**
+
+- 成功
+
+```json
+{
+    "retcode": "0",
+    "retmsg": "query success",
+    "status": "normal",
+    "balance": 5040,
+    "frozenbal": 0,
+    "expiredate": "20300801",
+    "onceTimeLimit": 3000,
+    "dayTotalLimit": 20000
+}
+
+```
+
+- 失败
+
+```json
+{
+    "retcode": "51",
+    "retmsg": "card is lost"
+}
+
+```
+
+
+**返回参数说明:**
+
+|参数名 | 类型 | 说明 |
+|-----|-----|------|
+|retcode|String|返回码(0=成功,其他为失败)|
+|retmsg|String|返回消息|
+| status |String|状态 normal 正常,其他返回错误|
+|balance|Integer|余额(分)|
+| frozenbal |Integer|冻结金额(分)|
+| expiredate |String|卡有效期|
+| onceTimeLimit |Integer|单次消费最高限额(分),超出要输卡密码|
+| dayTotalLimit |Integer|当天累计消费限额(分),超出要输入卡密码|
+
+
+## 2.6 验证学工号/卡号和密码

+

+**请求URL:**

+

+- `http://ip:port/epayapi/services/thirdparty/common/verify`

+

+**请求方式/格式:**

+

+- POST

+- application/x-www-form-urlencoded

+

+**请求参数:**

+

+|参数名 | 类型 | 必选 | 说明 |

+|-----|------|-----|------|

+|partner_id|String|是|合作方ID|

+|stuempno|String|否|学工号(二选一)|

+|cardphyid|String|否|物理卡号(二选一)|

+|cardpwd|String|是|卡密码AES加密,加密密钥线下提供|

+|timestamp|String|是|时间戳格式为yyyyMMddHHmmss|

+|sign|String|是|数据签名|

+|sign_method|String|是|签名方式,固定为:HMAC|

+
+

+**请求内容示例:**
+```
+

+- URL:http://ip:port/epayapi/services/thirdparty/common/verify

+- partner_id:10000

+- stuempno:09893092

+- cardpwd:vj16YGawjSlYkaWOND+gog==

+- timestamp:20171219130901

+- sign:09ce91ba0c46b486f841caa51cff1589e9b83b2e

+- sign_method:HMAC
+

+

+**返回示例:**

+

+- 成功

+

+```json

+{

+	"retcode":0,

+	"retmsg":"验证成功"

+}

+

+```

+

+- 失败

+

+```json

+{

+	"retcode":1,

+	"retmsg":"错误信息"

+}

+

+```

+

+**返回参数说明:**

+

+|参数名 | 类型 | 说明 |

+|-----|-----|------|

+|retcode|String|返回码(0=成功,其他为失败)|

+|retmsg|String|返回消息|
+
+
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\263\273\347\273\237\345\256\211\350\243\205\351\203\250\347\275\262\346\211\213\345\206\214.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\263\273\347\273\237\345\256\211\350\243\205\351\203\250\347\275\262\346\211\213\345\206\214.md"
index 8871eee..55f01f6 100644
--- "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\263\273\347\273\237\345\256\211\350\243\205\351\203\250\347\275\262\346\211\213\345\206\214.md"
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\263\273\347\273\237\345\256\211\350\243\205\351\203\250\347\275\262\346\211\213\345\206\214.md"
@@ -44,6 +44,19 @@
 前置服务包括消费前置、门禁前置、微信支付宝充值服务前置、圈存前置等等。前置服务需要根据现场使用情况进行配置,无特殊要求下,前置服务器配置:2核CPU,4G 内存,200G硬盘,一块千兆网卡,操作系统为 `CentOS 7` 或 `OracleLinux 7` 64 位。
 
 	`消费前置`- 消费前置可以部署两台实现容错。消费网关可以配置连接两台消费前置,网关会自动判断请求正常的消费前置。
+	
+* **服务器配置清单模板**
+		
+| 服务器 | 数量 | 硬件要求 | 软件要求 |
+| --- | --- | --- | --- |
+| 数据库服务器 | 2 | 4核CPU,16G内存,500G硬盘 | Oracle Linux6  |
+| 缓存服务器 | 1 | 4核CPU,32G内存,100G硬盘 | CentOS 7 64位 |
+| 应用服务器 | 2 | 4核CPU,8G内存,200G硬盘 | CentOS 7 64位 |
+| API服务器 | 2 | 4核CPU,8G内存,200G硬盘 | CentOS 7 64位 |
+| 代理服务器 | 2 | 4核CPU,4G内存,100G硬盘 | CentOS 7 64位 |
+| 消费前置机 | 2 | 4核CPU,4G内存,100G硬盘 | CentOS 7 64位  |
+| 水控前置机 | 1 | 4核CPU,4G内存,100G硬盘 | CentOS 7 64位  |
+
 
 ## 服务器要求
 **所有**的服务器必须按照下面要求进行配置。
@@ -272,6 +285,24 @@
 }
 ~~~
 
+### 正向代理
+`CentOS 7` : http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/p/privoxy-3.0.26-1.el7.x86_64.rpm
+
+`CentOS 6` : http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/p/privoxy-3.0.24-2.el6.x86_64.rpm
+
+
+```bash
+$ wget privoxy_url
+$ rpm -ivh privoxy-x.x.x.x86_64.rpm
+```
+
+修改配置文件 /etc/privoxy/config , 将 `listen-address  127.0.0.1:8118` 改为 `listen-address  0.0.0.0:8118`
+
+```bash
+$ service privoxy start
+$ service privoxy status
+```
+
 ### 数据库初始化
 按照文件名顺序执行数据库初始化脚本
 
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\263\273\347\273\237\345\272\224\347\224\250\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\263\273\347\273\237\345\272\224\347\224\250\346\216\245\345\217\243\346\226\207\346\241\243.md"
index e6e236e..b6a1099 100644
--- "a/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\263\273\347\273\237\345\272\224\347\224\250\346\216\245\345\217\243\346\226\207\346\241\243.md"
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232v5\347\263\273\347\273\237\345\272\224\347\224\250\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -1679,7 +1679,236 @@
 
 ```
 
+# 7、自助发卡 #
+## 7.1 开卡计算费用 ##
 
+**请求URL:**
+
+- `https://ip:port/epayapi/services/front/card/publish/calculateopencardcost`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+- 签名说明:除设备签到专用参数(app_id,term_id,timestamp,sign_method,sign)外,其他参数按参数名称的字典排序拼接非空参数值,然后加上timestamp,最后加上sessionkey构成加密字符串。
+
+| 参数名 | 类型 | 说明 |
+| --- | --- | --- |
+| cardtype | Integer | 发卡类型 |
+| custid | Integer | 客户号 |
+| feetype | Integer | 收费类别 |
+| app_id | String | 应用ID |
+| term_id| String | 设备终端号或物理ID |
+| timestamp | String | 时间戳 ‘yyyyMMddHHmmss’ |
+| sign | String | 签名 |
+| sign_method | String | 签名方法 |
+
+
+**返回参数说明:**
+
+| 参数名 | 类型 | 说明 |
+| --- | --- | --- |
+| status | String | 状态 success/fail |
+| error | String | 错误信息 |
+| amount | Double | 发卡费用 |
+| expiredate |String| 卡有效期 |
+| transinfo | String| 收费信息 |
+
+**返回示例:**
+
+- 成功
+
+```json
+{
+    "status": "success",
+    "amount": "0.00",
+    "expiredate": "2018-08-25",
+    "transinfo": ""
+}
+```
+
+- 失败
+
+```json
+{
+    "status": "fail",
+    "amount": "签名验证失败"
+}
+
+```
+
+## 7.1 获取写卡数据 ##
+
+**请求URL:**
+
+- `https://ip:port/epayapi/services/front/card/publish/opencardinit`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+- 签名说明:除设备签到专用参数(app_id,term_id,timestamp,sign_method,sign)外,其他参数按参数名称的字典排序拼接非空参数值,然后加上timestamp,最后加上sessionkey构成加密字符串。
+
+| 参数名 | 类型 | 说明 |
+| --- | --- | --- |
+| cardtype | Integer | 发卡类型 |
+| custid | Integer | 客户号 |
+| feetype | Integer | 收费类别 |
+| cardphyid | String | 新卡物理ID |
+| cardphytypecode | Integer | 新卡物理类型 |
+| showcardno | String | 新卡显示卡号 |
+| amount | Integer | 总金额(充值金额+费用),单位分。包含cost |
+| cost | Integer | 发卡费用,单位分 |
+| fundtype | Integer | 资金类型 1-现金 2-支票 3-经费本 |
+| voucherno | String | 票据号码,fundtype不为1时必填 |
+| expiredate | String | 卡有效期 |
+| samno | String | PSAM卡号 |
+| operid | Integer | 操作员ID |
+| termid | Integer | 设备ID |
+| app_id | String | 应用ID |
+| term_id| String | 设备终端号或物理ID |
+| timestamp | String | 时间戳 ‘yyyyMMddHHmmss’ |
+| sign | String | 签名 |
+| sign_method | String | 签名方法 |
+
+**返回参数说明:**
+
+| 参数名 | 类型 | 说明 |
+| --- | --- | --- |
+| status | String | 状态 success/fail |
+| error | String | 错误信息 |
+| data | String | 写卡数据 |
+| cardmode |String| 卡模式 ‘A’或‘B’|
+| chargeid | Integer| 客户号 |
+| amount | Double | 总金额,元 |
+| cost | Double| 费用,元 |
+| cardno | Integer| 新卡卡号 |
+| refno |String| 开卡流水号 |
+| accdate| String| 记账日期 |
+
+**返回示例:**
+
+- 成功
+
+```json
+{
+    "status": "success",
+    "data": "CF_SINGLEMAXAMT=3000;CF_DAYMAXAMT=20000;CF_CARDNO=259;CF_SHOWCARDNO=0000000000;CF_CARDVERNO=000000000000;CF_CARDSTATUS=0;CF_FEETYPE=14;CF_STARTDATE=20170825;CF_EXPIREDATE=20300901;CF_CARDTYPE=4;CF_CARDPWD=926441;CF_CUSTID=2000081;CF_CUSTTYPE=14;CF_STUEMPNO=10002255;CF_NAME=蒋国民;CF_SCHOOLCODE=2;CF_SEX=1;CF_DEPTCODE=03;CF_IDNO=310104480926441;CF_IDTYPE=1;CF_NATIONALITY=1;CF_COUNTRY=CHN;CF_CREDITLIMIT=20000;CF_CREDITSEQNO=1",
+    "cardmode": "A",
+    "chargeid": "2000081",
+    "amount": 0.12,
+    "cost": 0,
+    "accdate": "20170825",
+    "refno": "20170825105300003182",
+    "cardno": 259
+}
+```
+
+- 失败
+
+```json
+{
+    "status": "fail",
+    "amount": "签名验证失败"
+}
+
+```
+
+
+## 7.1 写卡确认和充值 ##
+
+**请求URL:**
+
+- `https://ip:port/epayapi/services/front/card/publish/opencardconfirm`
+
+**请求方式/格式:** 
+
+- POST
+- application/x-www-form-urlencoded
+
+**请求参数:**
+
+- 签名说明:除设备签到专用参数(app_id,term_id,timestamp,sign_method,sign)外,其他参数按参数名称的字典排序拼接非空参数值,然后加上timestamp,最后加上sessionkey构成加密字符串。
+
+| 参数名 | 类型 | 说明 |
+| --- | --- | --- |
+| accdate | String | 记账日期,第一步获取的accdate |
+| refno | String | 开卡流水号,第一步获取的refno |
+| cardno | Integer | 新卡卡号,第一步获取的cardno |
+| isok | Integer | 写卡成功标志 |
+| isbreak | Integer | 中途拔卡标志 |
+| errmsg | String | 写卡失败原因 |
+| samno | String | PSAM卡号 |
+| custid | Integer | 客户号,第一步获取的chargeid |
+| amount | Integer | 总金额(充值金额+费用),单位分。包含cost |
+| cost | Integer | 发卡费用,单位分 |
+| fundtype | Integer | 资金类型 1-现金 2-支票 3-经费本 |
+| voucherno | String | 票据号码,fundtype不为1时必填 |
+| cardmode | String | 卡模式 |
+| operid | Integer | 操作员ID |
+| termid | Integer | 设备ID |
+| app_id | String | 应用ID |
+| term_id| String | 设备终端号或物理ID |
+| timestamp | String | 时间戳 ‘yyyyMMddHHmmss’ |
+| sign | String | 签名 |
+| sign_method | String | 签名方法 |
+
+**返回参数说明:**
+
+| 参数名 | 类型 | 说明 |
+| --- | --- | --- |
+| status | String | 状态 success/fail |
+| error | String | 错误信息 |
+| succmsg | String | 发卡信息 |
+| refno |String| 开卡流水号 |
+| endflag | String | 结束标志 ‘YES’或‘NO’ (暂不支持B卡充值,发B卡请勿充值)|
+| cardno | Integer| 新卡卡号 |
+| custid | Integer | 客户号 |
+| stuempno | String| 学工号 |
+| name | String | 姓名 |
+| charge | String | 实际充值金额 |
+| feeamt | String | 充值手续费金额 |
+| ftyname | String | 收取的基金类型 |
+| fundmsg | String | 发卡收费说明 |
+| accbal | String | 账户余额 |
+
+**返回示例:**
+
+- 成功
+
+```json
+{
+    "status": "success",
+    "succmsg": "发卡成功! 收入【现金】金额为:0.12元,扣除成本费:0.0元,扣除手续费:0.01元,成功充值:0.11元。",
+    "refno": "20170825110000003183",
+    "endflag": "YES",
+    "cardno": "260",
+    "custid": "2000081",
+    "name": "蒋国民",
+    "stuempno": "10002255",
+    "charge": "0.11元",
+    "feeamt": "0.01元",
+    "ftyname": "现金",
+    "fundmsg": "0.12元(含成本费:0.0元)",
+    "accbal": "0.11元"
+}
+```
+
+- 失败
+
+```json
+{
+    "status": "fail",
+    "error": "签名验证失败"
+}
+
+```
 

 
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232\346\226\260\345\274\200\346\231\256POS\346\234\272\345\256\211\350\243\205\350\257\264\346\230\216.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232\346\226\260\345\274\200\346\231\256POS\346\234\272\345\256\211\350\243\205\350\257\264\346\230\216.md"
index 46b3cdc..231d35c 100644
--- "a/source/_posts/\344\270\200\345\215\241\351\200\232\346\226\260\345\274\200\346\231\256POS\346\234\272\345\256\211\350\243\205\350\257\264\346\230\216.md"
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232\346\226\260\345\274\200\346\231\256POS\346\234\272\345\256\211\350\243\205\350\257\264\346\230\216.md"
@@ -21,7 +21,7 @@
 ### 消费终端前置机
 * 程序
 
-> 消费终端前置机程序包括主程序 newcapec-can-<os> 和配置文件 newcapec-can.cfg。Linux 平台程序名 newcapec-can-linux , Windows 平台程序名 newcapec-can-win.exe。
+> 消费终端前置机程序包括主程序 newcapec-can-<os> 和配置文件 newcapec-can.cfg。Linux 平台程序名 newcapec-can-linux , Windows 平台程序名 newcapec-can-win64.exe。
 
 > 前置程序不需要其它依赖环境既可运行
 
@@ -37,16 +37,15 @@
 
 rpc_port=12451
 
-
 # app config
 appid=100001
 appsecret=3072a87ece234b728b519ded8dd152b1
 baseurl=https://172.28.200.122:18443/epayapi/services
 # 验证 ssl 证书合法性, 可选值 true , false
-ssl_verify=false
+ssl_verify=true
 
 # upgrade rom
-rom_name=SWPos.bin
+rom_name=/opt/SWPos.bin
 ```
 
 <br/>
@@ -61,57 +60,48 @@
 
 推荐使用 Centos 7 / RedHat 7 版本, 系统要求 64 位。
 
-* 直接运行方法
-
-在 Linux 下运行 ./newcapec-can-linux 启动服务;如果需要在后台运行服务用以下命令:
-
-~~~bash
-$ nohup ./newcapec-can-linux &
-~~~
-
-* systemd 方式运行
-
-在系统中建立 ecard 用户,并在创建前置工作目录
+* 安装方法  
+安装 RPM 包 
 
 ```bash
-$ groupadd -g 10005 ecard
-$ useradd -u 10005 -g ecard ecard
-$ mkdir -p /opt/newcapec-pos-svr
-$ chown -R ecard.ecard /opt/newcapec-pos-svr
+$ rpm -ivh newcapec-agent-x.x.x-centos7.x86_64.rpm 
 ```
 
-将在前置程序上传到 /opt/newcapec-pos-svr 工作目录下,并保证有执行权限。你可以通过手工运行前置程序生成默认的配置文件,配置文件名 **newcapec-can.cfg** 。
+修改前置机配置文件 /etc/newcapec-can.cfg , 将 baseurl 改为正确的服务器地址。
 
-拷贝 newcapecsvr.service 到 /etc/systemd/system/ 目录下, 用 root 用户执行以下配置命令。
+启动前置服务后,systemd 服务会监控前置程序的运行情况。如果前置机异常退出, systemd 会在 3 秒之后启动前置机程序。
 
 ```bash
-$ systemctl daemon-realod
-$ systemctl enable newcapecsvr
-$ systemctl start newcapecsvr
-$ systemctl status newcapecsvr  # 检查服务启动情况
-● newcapecsvr.service - Supwisdom Newcapec POS Server
-   Loaded: loaded (/etc/systemd/system/newcapecsvr.service; disabled; vendor preset: disabled)
-   Active: active (running) since 三 2016-08-03 16:43:28 CST; 21h ago
- Main PID: 195463 (newcapec-can-li)
-   CGroup: /system.slice/newcapecsvr.service
-           └─195463 /opt/newcapec-pos-svr/newcapec-can-linux -config=/opt/newcapec-pos-svr/newcapec-can.cfg
+[root@yktdev ~]# systemctl start newcapec-agent
+[root@yktdev ~]# systemctl status newcapec-agent
+● newcapec-agent.service - Supwisdom Newcapec POS Server
+   Loaded: loaded (/usr/lib/systemd/system/newcapec-agent.service; disabled; vendor preset: disabled)
+  Drop-In: /etc/systemd/system/newcapec-agent.service.d
+           └─override.conf
+   Active: active (running) since 五 2018-01-19 10:58:01 CST; 1s ago
+ Main PID: 180338 (newcapec-can-li)
+   Memory: 6.1M
+   CGroup: /system.slice/newcapec-agent.service
+           └─180338 /usr/bin/newcapec-can-linux -config=/etc/newcapec-can.cfg -logpath /var/log/newcapec-agent
 
-8月 03 16:43:28 yktdev2 systemd[1]: Started Supwisdom Newcapec POS Server.
-8月 03 16:43:28 yktdev2 systemd[1]: Starting Supwisdom Newcapec POS Server...
-8月 03 16:43:28 yktdev2 newcapec-can-linux[195463]: time="2016-08-03T16:43:28+08:00" level=info msg="服务启动侦听端口,time=2016-08-03 16:43:28.46119326 +0800 CST"
-8月 03 16:43:28 yktdev2 newcapec-can-linux[195463]: time="2016-08-03T16:43:28+08:00" level=info msg="newcapecCANPort=9876,newcapecTCPPort=9877,huiduoCANPort=9878"
-8月 03 16:43:28 yktdev2 newcapec-can-linux[195463]: time="2016-08-03T16:43:28+08:00" level=info msg="Go version: go1.6.3"
-8月 03 16:43:28 yktdev2 newcapec-can-linux[195463]: time="2016-08-03T16:43:28+08:00" level=debug msg="Info TotalAlloc=746280 Bytes, Free=606 Bytes"
-8月 03 16:44:28 yktdev2 newcapec-can-linux[195463]: time="2016-08-03T16:44:28+08:00" level=info msg="System GC at 2016-08-03 16:44:28.461495496 +0800 CST"
-8月 03 16:44:28 yktdev2 newcapec-can-linux[195463]: time="2016-08-03T16:44:28+08:00" level=debug msg="Info TotalAlloc=755360 Bytes, Free=2086 Bytes"
+1月 19 10:58:01 yktdev systemd[1]: Started Supwisdom Newcapec POS Server.
+1月 19 10:58:01 yktdev systemd[1]: Starting Supwisdom Newcapec POS Server...
 ```
 
+* 日志文件
+
+前置机日志文件在 /var/log/newcapec-agent 目录下
+
+* 升级 ROM
+
+需要在 newcapec-can.cfg 配置文件中配置 ROM 的绝对路径 rom_name=/opt/SWPos.bin ,并且保证该文件对所有人都有读权限。可以用 `chmod a+r /opt/SWPos.bin` 。
+
 * 前置服务监控
 
-前置服务可以通过监控命令获取运行状态报告,命令如下。该命令可以在 Window 电脑上运行, 运行的程序是 newcapec-can-win.exe。
+前置服务可以通过监控命令获取运行状态报告,命令如下。该命令可以在 Window 电脑上运行, 运行的程序是 `newcapec-can-win64.exe`。
 
 ```bash
-$ ./newcapec-can-osx -showinfo -agent 172.28.200.128
+$ /usr/bin/newcapec-can-linux -showinfo -agent 172.28.200.128
 服务启动时间: 2015-08-19 10:08:32.481028525 +0800 CST
 程序版本: 1.1.0, Build: 2015-08-19.10:06:20
 Go Version: go1.5rc1
diff --git "a/source/_posts/\344\270\200\345\215\241\351\200\232\350\257\273\345\215\241\346\234\215\345\212\241\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/source/_posts/\344\270\200\345\215\241\351\200\232\350\257\273\345\215\241\346\234\215\345\212\241\346\216\245\345\217\243\346\226\207\346\241\243.md"
index 776714a..43bdded 100644
--- "a/source/_posts/\344\270\200\345\215\241\351\200\232\350\257\273\345\215\241\346\234\215\345\212\241\346\216\245\345\217\243\346\226\207\346\241\243.md"
+++ "b/source/_posts/\344\270\200\345\215\241\351\200\232\350\257\273\345\215\241\346\234\215\345\212\241\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -4,7 +4,7 @@
 tags:
 ---
 
-* **version : 1.5**
+* **version : 1.7**
 
 ## 错误码定义
 * 100 - 一般错误
@@ -24,6 +24,7 @@
 `version` - 读卡服务版本
 `card_version` - 读卡模块版本
 `card_info` - 读卡模块编译信息
+`cfgid` - 读卡服务配置ID , V5版本
 
 ## 服务认证
 * **URL: /4/auth/&lt;action&gt;**
@@ -44,6 +45,28 @@
 `request_token` : verify 成功后返回 request_token
 `token_expired` : verify 成功后返回的 token 的有效期
 
+## 获取读卡库支持配置清单
+* **URL: /5/config_list**
+
+* **请求方式**
+`GET`
+
+* **请求参数**
+无
+
+* **返回**
+`config`: 支持的配置清单,{ "id" : ... , "desc": ... } 对象数组
+
+## 加载读卡器配置
+* **URL: /5/init**
+`POST`
+
+* **请求参数**
+`id`: 配置 ID 号
+
+* **返回**
+无
+
 ## 读卡器控制
 * **URL: /4/device/&lt;action&gt;**
 
@@ -224,6 +247,7 @@
    CF\_IDCODE - 身份代码
    CF\_CREDITLIMIT - 授信额度
    CF\_CREDITSEQNO - 授权额度批次
+   CF\_CREDITENABLED - 是否运行授信消费
 
 * **返回**
 `cardmode` - 卡模式,可选值 A, B   
@@ -263,6 +287,7 @@
    CF\_IDCODE - 身份代码
    CF\_CREDITLIMIT - 授信额度
    CF\_CREDITSEQNO - 授权额度批次
+   CF\_CREDITENABLED - 是否运行授信消费, 0: 允许, 1: 不允许
 
 * **返回**

@@ -446,10 +471,12 @@
 `GET`
 
 * **Url 参数**
-`action`: 可选值 write, read, recycle
+`action`: 可选值 requestcard, write, read, recycle
 
 * **请求参数**
 
+`requestcard` - 寻卡
+
 `write` - 写参数卡
 
 请求格式为 json , Content-Type: application/json;
@@ -459,6 +486,8 @@
 `main_work_key`: 主钱包密钥
 `packget_work_key`: 水控钱包密钥
 `work_mode`: 水控模式
+`expire_date`: 有效期
+`consume_mode`: 消费模式
 `water_packet_limit`: 水控钱包上限
 `transfer_limit`: 水控转账限额
 `feecfg`: 费率配置
@@ -475,6 +504,8 @@
 "main_work_key": "4344334539413846",
 "packget_work_key": "4344334539413846",
 "work_mode": 1,
+"expire_date": "20200101",
+"consume_mode": 0,
 "water_packet_limit": 5000,
 "transfer_limit": 500,
 "feecfg": [
@@ -495,3 +526,9 @@
 
 `read`: 读取水控参数卡
 `recycle`: 回收水控参数卡
+
+* **返回**
+
+`requestard`:
+> `cardphyid` - 卡片物理ID号
+