增加原悦校接口文档
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..00d4f86
--- /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,3620 @@
+---
+title: 一卡通v5平台终端接口文档
+date: 2017-07-12 15:04:23
+tags:
+---
+
+[TOC]
+
+## 修订历史
+
+|  版本   |  作者   |  日期     |    备注 |
+|-------- | --------| ------------| ------------------|
+|  V4.0.0  | 何林青  | 2015-01-06   | 初稿 |
+|  v4.0.1  | 汤成    | 2016-3-16  |  增加设备相关接口 |
+         
+## 前言
+### 编写目的
+本文档用于描述了易支付对外提供的所有api接口,包括提供手机app端和pos消费端,供内部业务依据此接口开发提供参考。
+
+### 约定
+* 1.  传输编码统一utf-8
+
+### 1.  系统结构描述
+
+## 1.  接口描述
+### **手机api功能入口**
+
+#### 注册绑定服务
+
+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   密码验证错误
+
+### 登录密码初始设置
+
+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   密码验证错误
+
+### 登录密码重置
+
+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   密码验证错误
+
+### 登录-设备授权码
+
+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   密码验证错误
+
+### 登录-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   密码验证错误
+
+### 电控校区查询
+
+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   密码验证错误
+
+### 电控区域查询
+
+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   密码验证错误
+
+### 电控楼栋查询
+
+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   密码验证错误
+
+### 电控楼层查询
+
+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   密码验证错误
+
+### 电控房间查询
+
+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   密码验证错误
+
+### 电控房间电量信息查询
+
+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   密码验证错误
+
+### 电控房间电量信息查询
+
+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   密码验证错误
+
+### 账户信息查询
+
+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   密码验证错误
+
+### 账单列表查询
+
+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   密码验证错误
+
+### 账单明细查询
+
+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   密码验证错误
+
+### 挂失卡查询
+
+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   密码验证错误
+
+### 卡挂失
+
+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   密码验证错误
+
+### 圈存银行卡列表查询
+
+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   密码验证错误
+
+### 充值初始化
+
+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   密码验证错误
+
+### 圈存充值
+
+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   密码验证错误
+
+### 圈存充值结果查询
+
+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   密码验证错误
+
+1.  **终端消费功能入口**
+--------------------
+
+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”:”交易参考号”
+
+}
+
+### 消费确认
+
+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”:”交易参考号”
+
+}
+
+### 卡片信息查询
+
+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为错误
+
+### 卡片在线消费
+
+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,需要密码确认,交易暂未成功,需要输入密码成功发送成功交易确认才完成交易。
+
+### 卡片在线消费密码确认
+
+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为错误
+
+### 卡片在线消费充正
+
+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为错误
+
+### 卡片授信消费流水上传
+
+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为错误
+
+### 卡片充值
+
+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为错误
+
+### 卡片充值充正
+
+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为错误
+
+### 终端流水号查询
+
+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为错误
+
+### 水控流水上传
+
+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为错误
+
+### 终端设备签到
+
+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为错误
+
+### 下载设备黑名单位图
+
+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为错误
+
+### 增量下载黑名单
+
+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为错误
+
+### 设备心跳
+
+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为错误
+
+### 下载设备参数
+
+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为错误
+
+### 下载设备卡权限费率
+
+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为错误
+
+### 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为错误
+
+1.  **多媒体对接功能入口**
+----------------------
+
+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   密码验证错误
+
+### 圈存充值
+
+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   密码验证错误
+
+### 圈存充值结果查询
+
+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   密码验证错误
+
+### 终端在线消费(第三方/多媒体)
+
+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输入密码)
+
+### 终端在线消费充正
+
+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为错误
+
+### 水控转账(多媒体)
+
+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输入密码)
+
+### 水控转账小钱包写卡确认(多媒体)
+
+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为错误
+
+1.  **支付宝前置对接功能入口**
+--------------------------
+
+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   密码验证错误
+
+### 支付宝充值确认
+
+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   密码验证错误
+
+1.  **第三方对接功能入口**
+----------------------
+
+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   密码验证错误
+
+### 换卡请求
+
+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   密码验证错误
+
+### 换卡确认
+
+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   密码验证错误
+
+### 取照片
+
+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   密码验证错误
+
+1.  **车载机功能入口**
+------------------
+
+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   密码验证错误
+
+### 车载机二维码支付
+
+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   密码验证错误
+
+