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
fdf0b4a1
Commit
fdf0b4a1
authored
Mar 05, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
73e198dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
center-app/app/base/service/impl/utilsSve/utilstlbankSve.js
+9
-4
No files found.
center-app/app/base/service/impl/utilsSve/utilstlbankSve.js
View file @
fdf0b4a1
...
@@ -153,6 +153,7 @@ class utilsTlBankSve {
...
@@ -153,6 +153,7 @@ class utilsTlBankSve {
async
getReqBeforeParam
(
jsonObj
,
pay_key
)
{
//获取请求前的参数信息
async
getReqBeforeParam
(
jsonObj
,
pay_key
)
{
//获取请求前的参数信息
jsonObj
.
key
=
pay_key
;
var
reqResult
=
{
status
:
0
,
msg
:
"success"
,
req_param
:
null
};
var
reqResult
=
{
status
:
0
,
msg
:
"success"
,
req_param
:
null
};
var
signArr
=
[];
var
signArr
=
[];
var
keys
=
Object
.
keys
(
jsonObj
).
sort
();
var
keys
=
Object
.
keys
(
jsonObj
).
sort
();
...
@@ -172,10 +173,10 @@ class utilsTlBankSve {
...
@@ -172,10 +173,10 @@ class utilsTlBankSve {
reqResult
.
msg
=
"请求组装签名参数信息为空"
;
reqResult
.
msg
=
"请求组装签名参数信息为空"
;
return
reqResult
;
return
reqResult
;
}
}
var
signStr
=
signArr
.
join
(
"&"
)
+
"&key="
+
pay_key
;
var
signStr
=
signArr
.
join
(
"&"
);
var
tmpSign
=
md5
(
signStr
).
toUpperCase
();
var
tmpSign
=
md5
(
signStr
).
toUpperCase
();
jsonObj
.
sign
=
tmpSign
;
jsonObj
.
sign
=
tmpSign
;
reqResult
.
req_param
=
jsonObj
;
delete
jsonObj
[
"key"
]
;
return
reqResult
;
return
reqResult
;
}
}
...
@@ -350,8 +351,12 @@ class utilsTlBankSve {
...
@@ -350,8 +351,12 @@ class utilsTlBankSve {
parmas
.
out_trade_no
=
attachList
[
0
].
substr
(
3
);
parmas
.
out_trade_no
=
attachList
[
0
].
substr
(
3
);
parmas
.
uappid
=
attachList
.
length
==
2
?
attachList
[
1
]
:
attachList
[
2
];
parmas
.
uappid
=
attachList
.
length
==
2
?
attachList
[
1
]
:
attachList
[
2
];
//重写新签名
//重写新签名
var
newparmas
=
await
this
.
getReqBeforeParam
(
parmas
,
appinfo
.
uapp_secret
);
var
signResult
=
await
this
.
createSign
(
parmas
,
appinfo
.
uapp_secret
);
var
backResult
=
await
this
.
restClient
.
execPost
(
newparmas
.
req_param
,
payParam
.
notify_url
);
if
(
signResult
.
status
!=
0
)
{
return
signResult
;
}
parmas
.
sign
=
signResult
.
data
;
var
backResult
=
await
this
.
restClient
.
execPost
(
parmas
,
payParam
.
notify_url
);
if
(
!
backResult
.
stdout
)
{
if
(
!
backResult
.
stdout
)
{
return
system
.
getResult
(
null
,
"回调notify_url中方法返回信息为空"
);
return
system
.
getResult
(
null
,
"回调notify_url中方法返回信息为空"
);
}
}
...
...
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