12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- package com.keao.edu.thirdparty.adapay;
- import com.alibaba.fastjson.JSON;
- import java.util.HashMap;
- import java.util.Map;
- /**
- * @author yingyong.wang
- */
- public class Bill extends ConfigInit {
- /**
- * 运行账单下载接口
- * @throws Exception 异常
- */
- public static void executeBillTest(String merchantKey) throws Exception{
- Bill demo = new Bill();
-
- Map<String, Object> download = demo.executeBillDownLoad(merchantKey);
-
- }
- /**
- * 运行账单下载接口
- * @throws Exception 异常
- */
- public static void executeBillTest() throws Exception{
- Bill demo = new Bill();
-
- Map<String, Object> download = demo.executeBillDownLoad();
-
- }
- /**
- * 执行一个下载对账文件操作
- * @return 下载链接
- * @throws Exception 异常
- */
- public Map<String, Object> executeBillDownLoad(String merchantKey) throws Exception {
- System.out.println("=======execute download begin=======");
- Map<String, Object> downloadParam = new HashMap<String, Object>(2);
- downloadParam.put("bill_date", "20190912");
- Map<String, Object> download = com.huifu.adapay.model.Bill.download(downloadParam, merchantKey);
-
- String errorCode = (String)download.get("error_code");
-
- if(null != errorCode){
- System.out.println("对账单下载,请求参数:" + JSON.toJSONString(downloadParam));
- System.out.println("对账单下载,返回参数:" + JSON.toJSONString(download));
- }else{
- System.out.println("对账单下载,成功");
- }
-
- return download;
- }
- /**
- * 执行一个下载对账文件操作
- * @return 下载链接
- * @throws Exception 异常
- */
- public Map<String, Object> executeBillDownLoad() throws Exception {
-
- Map<String, Object> downloadParam = new HashMap<String, Object>(2);
- downloadParam.put("bill_date", "20190912");
-
- Map<String, Object> download = com.huifu.adapay.model.Bill.download(downloadParam);
-
- String errorCode = (String)download.get("error_code");
-
- if(null != errorCode){
- System.out.println("对账单下载,请求参数:" + JSON.toJSONString(downloadParam));
- System.out.println("对账单下载,返回参数:" + JSON.toJSONString(download));
- }else{
- System.out.println("对账单下载,成功");
- }
- return download;
- }
-
- }
|