提交 9849f32b authored 作者: aiqingguo's avatar aiqingguo

Merge branch 'demo_bank_20231123' into test

......@@ -146,7 +146,7 @@ public class TempYftBankController {
SDKResponse result = NBOpenSDK.send(request);
log.info("SDK响应结果unionPayDirectOrder: "+JSON.toJSONString(result));
queryOrder(JSON.parseObject(JSON.toJSONString(result)).getJSONObject("data").getString("merSeqNo"));
// queryOrder(JSON.parseObject(JSON.toJSONString(result)).getJSONObject("data").getString("merSeqNo"));
} catch (Exception e) {
e.printStackTrace();
}
......@@ -363,7 +363,7 @@ public class TempYftBankController {
SDKResponse result = NBOpenSDK.send(request);
log.info("SDK响应结果directBankTransferOrder: "+JSON.toJSONString(result));
queryOrder(jsonObject.getString("merSeqNo"));
// queryOrder(jsonObject.getString("merSeqNo"));
} catch (Exception e) {
e.printStackTrace();
}
......
package com.clx.performance.controller.thirdparty;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.nbopen.api.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -17,7 +18,7 @@ public class NbBankController {
@ApiOperation(value = "notify", notes = "<br>By:艾庆国")
@RequestMapping(value = "/notify", method = RequestMethod.POST)
public void bankNotify(String message) throws Exception {
public SDKResponse bankNotify(String message) throws Exception {
log.info("宁波银行回调, data:{}", message);
RequestApiData requestApiData = new RequestApiData();
......@@ -36,12 +37,32 @@ public class NbBankController {
System.out.println("SDK响应结果: "+JSON.toJSONString(result));
return null;
// HashMap hashMap = new HashMap();
// hashMap.put("errorCode", "000000");
// hashMap.put("errorMsg", "000000");
}
private SDKResponse getResult() throws Exception {
JSONObject jsonObject = new JSONObject();
jsonObject.put("errorCode", "000000");
jsonObject.put("errorMsg", "响应成功");
RequestApiData requestApiData = new RequestApiData();
requestApiData.setAppkey("77667c76_3503_4c04_95f7_fc10938c7942");
requestApiData.setData(jsonObject);
RequestHead requestHead = new RequestHead();
requestHead.setRqsJrnlNo(NBOpenSDK.getRandom());
SDKRequest request = new SDKRequest();
request.setData(requestApiData);
request.setHead(requestHead);
log.info("加密前: "+ JSON.toJSONString(request));
SDKResponse result = NBOpenSDK.encryptMessage(request);
log.info("加密后: "+JSON.toJSONString(result));
return result;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论