Commit b7c0c585 by 王昆

gsb

parent 9bfeff8a
...@@ -435,6 +435,7 @@ class BpoSDPJApi { ...@@ -435,6 +435,7 @@ class BpoSDPJApi {
"mchtId": cashInfo.mchtId, "mchtId": cashInfo.mchtId,
"nonceStr": nonceStr, "nonceStr": nonceStr,
"notityUrl": "https://bpohhr.gongsibao.com/api/bpoSDPJApi/wxnotify", "notityUrl": "https://bpohhr.gongsibao.com/api/bpoSDPJApi/wxnotify",
// "notityUrl": "https://bpohhr.gongsibao.com/api/econtractApi/transferNotify",
"outTradeNo": cashInfo.outTradeNo, "outTradeNo": cashInfo.outTradeNo,
"signType": "MD5", "signType": "MD5",
"tradeTime": tradeTime, "tradeTime": tradeTime,
...@@ -507,7 +508,7 @@ class BpoSDPJApi { ...@@ -507,7 +508,7 @@ class BpoSDPJApi {
let params = { let params = {
"appId": cashInfo.app_id, "appId": cashInfo.app_id,
"mchtId": cashInfo.mchtId, "mchtId": cashInfo.mchtId,
nonceStr: await this.getUidStr(32, 36), "nonceStr": await this.getUidStr(32, 36),
"currency": "CNY", "currency": "CNY",
"outTradeNo": cashInfo.outTradeNo, "outTradeNo": cashInfo.outTradeNo,
"seqNo": "1000", "seqNo": "1000",
...@@ -592,14 +593,14 @@ class BpoSDPJApi { ...@@ -592,14 +593,14 @@ class BpoSDPJApi {
} }
// 回调逻辑判断 // 回调逻辑判断
let respCode = this.trim(obj.respCode); let respTradeStatus = this.trim(obj.tradeStatus);
if (respCode == "00") { if (respTradeStatus == "00") {
cashInfo.trade_status = "00"; cashInfo.trade_status = "00";
cashInfo.trade_desc = "交易成功"; cashInfo.trade_desc = "交易成功";
await cashInfo. save(); await cashInfo. save();
this.notifyCash(cashInfo.id); this.notifyCash(cashInfo.id);
return {code: "0000"}; return {code: "0000"};
} else if (respCode == "02") { } else if (respTradeStatus == "02") {
cashInfo.trade_status = "02"; cashInfo.trade_status = "02";
cashInfo.trade_desc = obj.respDesc || "交易失败"; cashInfo.trade_desc = obj.respDesc || "交易失败";
await cashInfo.save(); await cashInfo.save();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment