Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
郝肖肖
8 years ago
Commit
20c635c7095b1cd3cea8824234f467dc9fe7fe06
2 parents
10e705ab
01a1a127
Merge branch 'feature/wechat-pay' into release/2.0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
apps/shopping/helpers/pay/alibank.js
apps/shopping/helpers/payment.js
config/common.js
apps/shopping/helpers/pay/alibank.js
View file @
20c635c
...
...
@@ -56,7 +56,7 @@ const Alibank = {
let
orderCode
=
parseInt
(
outTradeNos
[
0
],
10
);
let
bankName
=
outTradeNos
[
1
]
&&
payHelpersBank
.
getList
()[
outTradeNos
[
1
]].
name
||
''
;
logger
.
info
(
`
Ali
pay
notify
,
params
=
$
{
JSON
.
stringify
(
data
)}
`
);
logger
.
info
(
`
Ali
bank
notify
,
params
=
$
{
JSON
.
stringify
(
data
)}
`
);
if
(
!
this
.
checkNotify
(
data
,
payParams
))
{
return
{
payResult
:
-
1
,
bankName
:
bankName
};
...
...
apps/shopping/helpers/payment.js
View file @
20c635c
...
...
@@ -73,6 +73,8 @@ const Payment = {
}
}
logger
.
info
(
`
pay
to
url
,
params
=
$
{
JSON
.
stringify
(
result
)}
`
);
if
(
result
.
code
===
200
)
{
let
updateInfo
=
yield
Payment
.
beforePay
(
user
,
order
,
method
,
bankCode
);
...
...
@@ -133,6 +135,14 @@ const Payment = {
payResult
.
bankName
=
payName
=
payResult
.
bankName
||
payInfo
.
payName
||
''
;
payResult
.
bankCode
=
payResult
.
bankCode
||
payInfo
.
pay_code
||
''
;
//记录日志
logger
.
info
(
`\
r
\
n
\
r
\
n
pay
back
confirm
,
req
=
$
{
JSON
.
stringify
({
query
:
query
,
payId
:
payId
,
user
:
user
,
payResult
:
payResult
})}
`
);
if
(
payResult
&&
payResult
.
payResult
===
200
)
{
if
(
payResult
.
orderCode
)
{
logger
.
info
(
'pay back confirm'
);
...
...
config/common.js
View file @
20c635c
...
...
@@ -103,7 +103,7 @@ module.exports = {
}
},
pay
:
{
serviceNotify
:
'http://
devservice.yoho.cn:58077
/'
serviceNotify
:
'http://
service-test3.yohops.com:9999
/'
},
crypto
:
{
common
:
'yohoblk9646abcde'
...
...
@@ -159,6 +159,9 @@ if (isProduction) {
session
:
[
'127.0.0.1:12111'
],
timeout
:
1000
,
retries
:
0
},
pay
:
{
serviceNotify
:
'http://service-test3.yohops.com:9999/'
}
});
}
...
...
Please
register
or
login
to post a comment