1.报文举例-获取产品调用token信息:
请求URL:
https://openapi.unionpay.com/upapi/upfile/token?app_id=[value]&app_secret=[value]
应答JSON报文体:
{ “respCd”:“0000” “respMsg”:“成功” “token”: “”, “expire_in”:7200 }
2.报文举例-文件任务查询
请求URL:
https://openapi.unionpay.com/upapi/upfile/taskInfo?token=[value]&sign=[value]&ts=[value]
请求报文参数:
{ “fileName”: “name”, “beginFileDate”: “20180101”, “endFileDate”: “20180102”, ...... }
应答JSON报文体:
{ “respCd”: “0000”, “respMsg”: “msg”, “data”: { “totalCount”: “11”, “totalPage”: “2”, “currentPage”: “1”, “list”: [{“fileName”: “name1”, “fileDate”: “20180101”, “taskDate”: “20180101”, ...... },{“fileName”: “name2”, “fileDate”: “20180101”, “taskDate”: “20180101”, ...... } ] } }
3.报文举例-文件任务重做
请求URL:
https://openapi.unionpay.com/upapi/upfile/taskRedo?token=[value]&sign=[value]&ts=[value]
请求报文参数:
{ “fileName”: “name”, “beginFileDate”: “20180101”, “endFileDate”: “20180102”, ...... }
应答JSON报文体:
{ “respCd”“0000”, “respMsg”:“msg” }
报文签名规则([sign]生产方法):
1. 报文前拼接签名密钥,后面拼接时间戳(毫秒)字符串:secret + body + ts
secret: 签名密钥
body: 请求JSON报文
ts: 时间戳,毫秒
2. 使用SHA-256算法计算HASH值
3. 具体签名样例代码参照附录部分。