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
5fe7af1d
Commit
5fe7af1d
authored
Oct 23, 2020
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
46fd6ec3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
100 additions
and
3 deletions
+100
-3
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+100
-3
No files found.
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
5fe7af1d
...
@@ -80,9 +80,11 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -80,9 +80,11 @@ class UtilsOrderService extends AppServiceBase {
return
productItemResult
;
return
productItemResult
;
}
}
pobj
.
actionBody
.
product_info
=
productItemResult
.
data
;
pobj
.
actionBody
.
product_info
=
productItemResult
.
data
;
var
verifyResult
=
await
this
.
isOrderVerify
(
pobj
,
pobj
.
actionBody
);
if
(
pobj
.
appInfo
.
app_code
!=
"zc360"
){
if
(
verifyResult
.
status
!=
0
)
{
var
verifyResult
=
await
this
.
isOrderVerify
(
pobj
,
pobj
.
actionBody
);
return
verifyResult
;
if
(
verifyResult
.
status
!=
0
)
{
return
verifyResult
;
}
}
}
pobj
.
actionType
=
"getProductInterface"
;
pobj
.
actionType
=
"getProductInterface"
;
pobj
.
actionBody
.
product_id
=
pobj
.
actionBody
.
product_info
.
id
;
pobj
.
actionBody
.
product_id
=
pobj
.
actionBody
.
product_info
.
id
;
...
@@ -963,6 +965,101 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -963,6 +965,101 @@ class UtilsOrderService extends AppServiceBase {
}
}
async
channelPayNotify360
(
params
,
client_ip
)
{
//渠道订单支付通知
try
{
this
.
logCtl
.
info
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"渠道订单支付回调参数信息"
,
op
:
"service/impl/utilsSve/utilsOrderSve.js/channelPayNotify"
,
content
:
JSON
.
stringify
(
params
),
clientIp
:
client_ip
||
""
});
if
(
!
params
.
appkey
)
{
return
system
.
getResult
(
null
,
'appKey can be not null'
)
}
if
(
!
params
.
orderNo
)
{
return
system
.
getResult
(
null
,
'orderNo can be not null'
)
}
if
(
!
params
.
payTotalSum
)
{
return
system
.
getResult
(
null
,
'payTotalSum can be not null'
)
}
if
(
!
params
.
signature
)
{
return
system
.
getResult
(
null
,
'signature can be not null'
)
}
if
(
!
params
.
payType
)
{
return
system
.
getResult
(
null
,
'payType can be not null'
)
}
if
(
!
params
.
payOrderNo
)
{
return
system
.
getResult
(
null
,
'payOrderNo can be not null'
)
}
let
url
=
this
.
centerAppUrl
+
'payment/paymentApi/getAppInfoByAppKey'
;
let
appInfoRt
=
await
this
.
restPostUrl
({
appKey
:
params
.
appkey
},
url
);
if
(
appInfoRt
.
status
!=
0
)
{
appInfoRt
.
msg
=
appInfoRt
.
msg
+
",100270"
;
return
appInfoRt
;
}
let
singStr
=
params
.
appkey
+
params
.
orderNo
+
params
.
payTotalSum
+
appInfoRt
.
data
.
uapp_secret
let
sign
=
md5
(
singStr
).
toUpperCase
();
if
(
sign
!=
params
.
signature
)
{
return
system
.
getResultFail
(
-
1
,
'验证签名失败'
)
}
var
appInfo
=
appInfoRt
.
data
;
params
.
appInfo
=
{
uapp_id
:
appInfo
.
uapp_id
};
params
.
pay_type
=
params
.
payType
;
params
.
time_end
=
params
.
payTime
;
//修改并返回订单支付状态,创建收款单
// 这里修改了order_info的状态(status/paytime等)
var
orderUrl
=
this
.
centerOrderUrl
+
"opaction/opPayOrder/receivePayCallBackNotifyByChannel"
;
var
opOrderResult
=
await
this
.
restPostUrl
(
params
,
orderUrl
);
if
(
opOrderResult
.
status
!=
0
)
{
opOrderResult
.
data
=
null
;
return
opOrderResult
;
}
if
(
!
opOrderResult
.
data
){
return
opOrderResult
;
}
opOrderResult
.
data
.
appInfo
=
{
uapp_id
:
appInfo
.
uapp_id
,
uapp_key
:
appInfo
.
uapp_key
,
app_code
:
appInfo
.
app_code
,
app_name
:
appInfo
.
app_name
};
opOrderResult
.
data
.
userInfo
=
{
channel_userid
:
opOrderResult
.
data
.
order_info
.
channelUserId
,
channel_username
:
opOrderResult
.
data
.
order_info
.
channelUserId
,
channel_nickname
:
opOrderResult
.
data
.
order_info
.
channelUserId
};
opOrderResult
.
data
.
orderNo
=
params
.
orderNo
;
opOrderResult
.
data
.
order_info
.
pay_flow_no
=
params
.
trade_no
||
""
;
// 2020 0704 lin 新增 推送fq必填字段
opOrderResult
.
data
.
order_info
.
pay_channel
=
params
.
payType
||
""
;
//付款方式
opOrderResult
.
data
.
order_info
.
pay_time
=
params
.
payTime
;
//付款时间
opOrderResult
.
data
.
order_info
.
pay_payer_bank_no
=
params
.
buyer_email
||
""
;
//付款账号
opOrderResult
.
data
.
order_contact
=
opOrderResult
.
data
.
delivery_content
.
orderContact
;
var
pobj
=
{
appInfo
:
opOrderResult
.
data
.
appInfo
,
actionBody
:
opOrderResult
.
data
}
// 推送
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"pushOrder"
,
0
);
if
([
'icpsq'
,
'edisq'
].
includes
(
opOrderResult
.
data
.
product_info
.
channel_item_code
)){
this
.
utilsPushSve
.
aliBusiness2Delivery
(
pobj
,
"pushDeliveryOrder"
);
}
opOrderResult
.
data
=
null
;
return
opOrderResult
;
}
catch
(
e
)
{
// await this.cacheManager["TlPayLocker"].release(params.orderNo);
this
.
logCtl
.
error
({
optitle
:
"回调处理订单---error异常"
,
op
:
"center-app/app/base/service/impl/utilsSve/utilsOrderSve.js/channelPayNotify"
,
content
:
"参数="
+
JSON
.
stringify
(
params
)
+
",error:"
+
e
.
stack
,
clientIp
:
client_ip
||
""
});
return
system
.
getResultFail
(
-
200
,
e
.
stack
);
}
}
async
tmAccept
(
pobj
)
{
// 2020 0828 lin 新增 ali商标交易 创建订单接口
async
tmAccept
(
pobj
)
{
// 2020 0828 lin 新增 ali商标交易 创建订单接口
try
{
try
{
var
actionBody
=
pobj
.
actionBody
;
var
actionBody
=
pobj
.
actionBody
;
...
...
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