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
38921f67
Commit
38921f67
authored
Jun 23, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alipay test
parent
6b379eb5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+2
-0
center-channel/app/base/service/impl/utilsSve/utilsUcommuneSve.js
+5
-2
center-channel/app/config/settings.js
+9
-2
No files found.
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
38921f67
...
...
@@ -45,6 +45,8 @@ class UtilsOrderService extends AppServiceBase {
if
(
buyPayTotalSum
==
0
)
{
actionBody
.
payTotalSum
=
totalSum
;
}
console
.
log
(
"buyTotalSum"
,
buyTotalSum
)
console
.
log
(
"totalSum"
,
totalSum
)
if
(
buyTotalSum
<
totalSum
)
{
return
system
.
getResult
(
null
,
"订单金额有误,100060"
);
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsUcommuneSve.js
View file @
38921f67
...
...
@@ -14,6 +14,7 @@ class UtilsUcommuneService extends AppServiceBase {
this
.
centerChannelUrl
=
settings
.
centerChannelUrl
();
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
this
.
utilsAuthSve
=
system
.
getObject
(
"service.utilsSve.utilsAuthSve"
);
this
.
paySecret
=
settings
.
paySecret
()
}
//--------------------------------优客工厂相关接口-start-----------------------------------------------------
...
...
@@ -100,7 +101,8 @@ class UtilsUcommuneService extends AppServiceBase {
"totalAmount"
:
orderResult
.
data
.
receiptVoucher
.
totalSum
,
}
var
sign
=
JSON
.
stringify
(
params
);
sign
+=
"ab53dfb909e4c32a"
// sign += "ab53dfb909e4c32a"
signstr
+=
this
.
paySecret
sign
=
md5
(
sign
).
toUpperCase
()
params
.
sign
=
sign
let
res
=
await
axios
.
post
(
creatPayRequrl
,
params
)
...
...
@@ -274,7 +276,8 @@ class UtilsUcommuneService extends AppServiceBase {
// "tradeType":"JSAPI"
// }
var
sign
=
JSON
.
stringify
(
params
);
sign
+=
"ab53dfb909e4c32a"
// sign += "ab53dfb909e4c32a"
signstr
+=
this
.
paySecret
sign
=
md5
(
sign
).
toUpperCase
()
params
.
sign
=
sign
console
.
log
(
params
)
...
...
center-channel/app/config/settings.js
View file @
38921f67
...
...
@@ -201,7 +201,7 @@ var settings = {
};
}
},
alipay
:
function
()
{
alipay
:
function
()
{
// 没有在使用 确定不需要后会去掉
return
new
AlipaySdk
({
// appId: payConfig.ali.appId,
...
...
@@ -212,7 +212,7 @@ var settings = {
});
},
wxpay
:
function
()
{
wxpay
:
function
()
{
// 没有在使用 确定不需要后会去掉
return
WXPay
({
appid
:
'wx6f3ebe44defe336a'
,
mch_id
:
'1232813602'
,
...
...
@@ -226,6 +226,13 @@ var settings = {
// partnerKey: 'sinotone2014sinotone2014sinotone',
// };
// return new tenpay(config);
},
paySecret
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"ab53dfb909e4c32a"
;
}
else
{
return
""
;
}
}
};
module
.
exports
=
settings
;
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