提交 2220904c authored 作者: aiqingguo's avatar aiqingguo

Merge branch 'demo_bank_20231123' into test

......@@ -155,7 +155,7 @@ public class TempYftBankController {
/**
* 结果查询
* 商户号:EFT33021200556315
* 返回结果:
* 返回结果: 90:交易不存在
* {
* "data": {
* "chargesAmt": "",
......@@ -194,6 +194,46 @@ public class TempYftBankController {
* "rspTime": "13:57:54:343"
* }
* }
* 返回结果: 02:交易已受理
* {
* "data": {
* "chargesAmt": "",
* "chargesType": "",
* "clearDate": "20231129",
* "errorCode": "000000",
* "errorMsg": "成功",
* "merId": "EFT33021200556315",
* "merSeqNo": "20231129142845",
* "payeeAcctBankName": "宁波银行股份有限公司",
* "payeeAcctBankNo": "313332082914",
* "payeeAcctName": "客户客户",
* "payeeAcctNo": "860411100000759182976409",
* "payMethod": "4",
* "pyerInfList": [
* {
* "customerId": "",
* "pyerAcctBankName": "",
* "pyerAcctName": "",
* "pyerAcctNo": "",
* "signNo": "",
* "transAmt": "",
* "transDtTm": ""
* }
* ],
* "realTrxAmt": "0",
* "transSeqNo": "20231129142846065496766yDTQtg2",
* "transStatus": "02",
* "trxAmt": "1.23"
* },
* "head": {
* "rqsJrnlNo": "15543431902274569",
* "rspCode": "000000",
* "rspDate": "2023-11-29",
* "rspMsg": "交易成功",
* "rspTime": "14:28:51:431"
* }
* }
*
* transStatus:
* 00:交易成功
* 01:交易失败
......@@ -262,22 +302,24 @@ public class TempYftBankController {
* 银行转账:86041110000075918(户名:客户客户)
* 订单支付:结算账号(86041110000075926(户名:客户客户))
* 响应结果:
* {
*{
* "data": {
* "acctNm": "客户客户",
* "acctOpenBankNm": "宁波银行股份有限公司",
* "bankId": "313332082914",
* "cardNo": "86041110000075918",
* "errorCode": "000000",
* "errorMsg": "成功",
* "frontUrl": "",
* "merId": "EFT33021200556315",
* "merSeqNo": "20231129133913",
* "signData": "",
* "transSeqNo": "2023112913391406547689VYvNioNz"
* "signNo": "2976409",
* "transSeqNo": "20231129142846065496766yDTQtg2",
* "virtualDays": "2024-05-26"
* },
* "head": {
* "rqsJrnlNo": "14414965925389704",
* "rqsJrnlNo": "15543427719351510",
* "rspCode": "000000",
* "rspDate": "2023-11-29",
* "rspMsg": "交易成功",
* "rspTime": "13:39:16:035"
* "rspTime": "14:28:49:600"
* }
* }
*/
......
package com.clx.performance.controller.thirdparty;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSON;
import com.nbopen.api.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
......@@ -17,9 +17,25 @@ public class NbBankController {
@ApiOperation(value = "notify", notes = "<br>By:艾庆国")
@RequestMapping(value = "/notify", method = RequestMethod.POST)
public void bankNotify(@RequestBody JSONObject param) {
public void bankNotify(String message) throws Exception {
log.info("宁波银行回调, data:{}", message);
RequestApiData requestApiData = new RequestApiData();
requestApiData.setAppkey("77667c76_3503_4c04_95f7_fc10938c7942");
requestApiData.setData(message);
RequestHead requestHead = new RequestHead();
requestHead.setRqsJrnlNo(NBOpenSDK.getRandom());
SDKRequest request = new SDKRequest();
request.setData(requestApiData);
request.setHead(requestHead);
System.out.println("SDK请求内容: "+ JSON.toJSONString(request));
SDKResponse result = NBOpenSDK.decryptMessage(request);
System.out.println("SDK响应结果: "+JSON.toJSONString(result));
log.info("宁波银行回调, data:{}", param.toJSONString());
// HashMap hashMap = new HashMap();
// hashMap.put("errorCode", "000000");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论