Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
11560202
Commit
11560202
authored
Jul 29, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
e73e2cc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
2 deletions
+67
-2
bpo-web/app/base/api/impl/bpoSDPJApi.js
+67
-2
No files found.
bpo-web/app/base/api/impl/bpoSDPJApi.js
View file @
11560202
...
@@ -553,12 +553,77 @@ class BpoSDPJApi {
...
@@ -553,12 +553,77 @@ class BpoSDPJApi {
// 通过postman推送回调
// 通过postman推送回调
async
notifyGuestById
(
obj
,
req
)
{
async
notifyGuestById
(
obj
,
req
)
{
this
.
notifyCash
(
obj
.
id
);
let
res
=
await
this
.
notifyCash
(
obj
.
no
);
return
this
.
getBaseResult
(
0
,
"调用成功"
,
res
);
}
}
// 推送回调
// 推送回调
async
notifyCash
(
id
)
{
async
notifyCash
(
id
)
{
// TODO 总统
try
{
// 签名验证
if
(
!
id
){
return
this
.
getErrResult
(
"ID不能为空"
);
}
let
ccashinfo
=
await
this
.
ccashinfoSve
.
findOne
({
id
:
id
});
if
(
!
ccashinfo
.
app_id
){
return
this
.
getErrResult
(
"app_id不能为空"
);
}
if
(
!
ccashinfo
.
ecid
){
return
this
.
getErrResult
(
"ecid不能为空"
);
}
if
(
!
ccashinfo
.
outTradeNo
){
return
this
.
getErrResult
(
"outTradeNo不能为空"
);
}
if
(
!
ccashinfo
.
amt
){
return
this
.
getErrResult
(
"amt不能为空"
);
}
// if(!ccashinfo.id_name){
// return this.getErrResult("id_name不能为空");
// }
// if(!ccashinfo.id_no){
// return this.getErrResult("id_no不能为空");
// }
if
(
!
ccashinfo
.
notify_url
){
return
this
.
getErrResult
(
"notify_url不能为空"
);
}
// 获取api信息
let
api
=
await
this
.
ecompanybusiSve
.
findOne
({
appId
:
ccashinfo
.
app_id
,
etemplate_id
:
ccashinfo
.
ecid
,
mchtId
:
ccashinfo
.
mchtId
,
});
if
(
!
api
)
{
return
this
.
getBaseResult
(
1001003
,
"配置信息错误,请联系薪必果人员进行配置"
);
}
let
param
=
{
appId
:
ccashinfo
.
app_id
,
ecid
:
ccashinfo
.
ecid
,
outTradeNo
:
ccashinfo
.
outTradeNo
,
amt
:
ccashinfo
.
amt
,
idName
:
ccashinfo
.
id_name
,
idNo
:
ccashinfo
.
id_no
,
tradeStatus
:
ccashinfo
.
trade_status
,
nonceStr
:
await
this
.
getUidStr
(
32
,
36
),
};
let
sign
=
system
.
getSign
(
param
,
api
.
key
,
this
.
EXCEPT_KEYS
)
param
.
sign
=
sign
;
let
rs
=
await
axios
({
method
:
'post'
,
url
:
ccashinfo
.
notify_url
,
data
:
param
,
});
return
rs
.
data
;
}
catch
(
e
)
{
console
.
log
(
e
);
let
result
=
{
code
:
500
,
msg
:
"接口异常"
};
console
.
log
(
e
.
stack
);
return
result
;
}
}
}
getSuccessResult
(
msg
=
"success"
,
data
=
{})
{
getSuccessResult
(
msg
=
"success"
,
data
=
{})
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment