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
81d28907
Commit
81d28907
authored
Aug 06, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Plain Diff
submitNeed push / submitIcpProgramme push
parents
d2b4c9df
8560e894
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
33 deletions
+70
-33
center-channel/app/base/api/impl/payment/paymentApi.js
+1
-1
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
+5
-2
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+16
-18
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+11
-11
center-channel/app/config/environment.js
+1
-1
center-channel/app/front/entry/public/apidoc/paymentDesc/payment.md
+36
-0
No files found.
center-channel/app/base/api/impl/payment/paymentApi.js
View file @
81d28907
...
...
@@ -34,7 +34,7 @@ class PaymentAPI extends WEBBase {
opResult
=
await
this
.
utilsOrderSve
.
getH5PayUrl
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getOrderQrCode"
:
//pc端订单支付二维码生成
opResult
=
await
this
.
utilsOrderSve
.
get
QrCodeInfo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOrderSve
.
get
OrderQrCode
(
pobj
,
pobj
.
actionBody
);
break
;
case
"queryOrderStatus"
:
//通联支付查询
opResult
=
await
this
.
utilsOrderSve
.
queryOrderStatus
(
pobj
,
pobj
.
actionBody
);
...
...
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
View file @
81d28907
...
...
@@ -56,6 +56,7 @@ class QcCenterOrderService extends AppServiceBase {
//推送方案
await
this
.
pushIcpSolution
(
pushObj
,
needsolution
.
solutionNo
,
pobj
.
appInfo
,
self
);
<<<<<<<
HEAD
// 2020 0806 lin 新增推送
var
reqParams
=
{
actionType
:
"produceData"
,
// Y 功能名称
...
...
@@ -71,6 +72,8 @@ class QcCenterOrderService extends AppServiceBase {
}
this
.
opQueuePushClientPost
(
pobj
,
this
.
opPushQueueUrl
,
reqParams
);
=======
>>>>>>>
8560
e89423a2072bbcaa023809d8b0a6f8a1b0c1
return
system
.
getResultSuccess
();
}
return
res
;
...
...
@@ -96,13 +99,13 @@ class QcCenterOrderService extends AppServiceBase {
var
confirmRes
=
await
self
.
aliclient
.
reqbyget
({
action
:
"ConfirmIntention"
,
reqbody
:
{
BizId
:
pushObj
.
IntentionBizId
},
apiVersion
:
"2019-05-08"
});
if
(
confirmRes
&&
confirmRes
.
status
==
0
&&
confirmRes
.
data
)
{
var
confirmResData
=
confirmRes
.
data
;
if
(
confirmResData
.
c
onfirmUrl
)
{
if
(
confirmResData
.
C
onfirmUrl
)
{
var
reqObj3
=
{
actionType
:
"receiveIcpConfirmUrl"
,
appInfo
:
appInfo
,
actionBody
:
{
solutionNo
:
solutionNo
,
confirmUrl
:
confirmResData
.
c
onfirmUrl
confirmUrl
:
confirmResData
.
C
onfirmUrl
}
};
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj3
);
//保存用户确认方案url
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
81d28907
...
...
@@ -82,14 +82,14 @@ class UtilsNeedService extends AppServiceBase {
if
(
reqUrl
)
{
var
url
=
this
.
centerOrderUrl
+
reqUrl
;
}
var
self
=
this
;
var
self
=
this
;
pobj
.
actionType
=
"receiveIcpFeedback"
;
// 2020 0803 lin 修改;
if
(
pobj
.
intentionStatus
)
{
// 如果需求当前字段为5(已关闭)则通知fq
if
(
pobj
.
intentionStatus
==
5
)
{
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
}
if
(
pobj
.
intentionStatus
)
{
// 如果需求当前字段为5(已关闭)则通知fq
if
(
pobj
.
intentionStatus
==
5
)
{
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
}
}
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
...
...
@@ -232,7 +232,7 @@ class UtilsNeedService extends AppServiceBase {
}
}
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntention"
,
reqbody
:
{
BizId
:
actionBody
.
channelNeedNo
,
Note
:
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntention"
,
reqbody
:
{
BizId
:
actionBody
.
channelNeedNo
,
Note
:
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
a
);
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
return
system
.
getResultSuccess
();
...
...
@@ -331,10 +331,10 @@ class UtilsNeedService extends AppServiceBase {
var
fileName
=
tmpFileName
.
substr
(
tmpFileName
.
lastIndexOf
(
"/"
)
+
1
,
tmpFileName
.
lenght
);
// 2020 0803 lin 修改;
var
urlJson
=
this
.
urlSplit
(
docUrl
);
if
(
urlJson
[
"Expires"
])
{
if
(
urlJson
[
"Expires"
])
{
// url中过期时间与服务器时间对比结果为已过期
if
(
urlJson
[
"Expires"
]
<
new
Date
().
getTime
())
{
return
"http://gsb-zc.oss-cn-beijing.aliyuncs.com/"
+
fileName
;
if
(
urlJson
[
"Expires"
]
<
new
Date
().
getTime
())
{
return
"http://gsb-zc.oss-cn-beijing.aliyuncs.com/"
+
fileName
;
}
}
//解码后的文件全名:xxx.pdf
...
...
@@ -401,8 +401,7 @@ class UtilsNeedService extends AppServiceBase {
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
let
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"WriteCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
intentionBizId
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
res
);
await
self
.
aliclient
.
reqbyget
({
action
:
"WriteCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
intentionBizId
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
return
system
.
getResultSuccess
();
}
...
...
@@ -423,17 +422,16 @@ class UtilsNeedService extends AppServiceBase {
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
res
);
return
system
.
getResultSuccess
(
res
);
}
urlSplit
(
url
)
{
var
arr
=
url
.
split
(
"?"
)[
1
];
//根据?跟个url
var
arr2
=
arr
[
1
].
split
(
"&"
);
//根据&重新分割参数
var
jsonarr
=
{};
//定义一个json对象放置url 参数
for
(
var
i
=
0
;
i
<
arr2
.
length
;
i
++
)
{
//循环将参数放到json里面
jsonarr
[
arr2
[
i
].
substring
(
0
,
1
)]
=
arr2
[
i
].
substring
(
2
,
3
);
var
arr
=
url
.
split
(
"?"
)[
1
];
//根据?跟个url
var
arr2
=
arr
[
1
].
split
(
"&"
);
//根据&重新分割参数
var
jsonarr
=
{};
//定义一个json对象放置url 参数
for
(
var
i
=
0
;
i
<
arr2
.
length
;
i
++
)
{
//循环将参数放到json里面
jsonarr
[
arr2
[
i
].
substring
(
0
,
1
)]
=
arr2
[
i
].
substring
(
2
,
3
);
}
return
jsonarr
;
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
81d28907
...
...
@@ -203,18 +203,18 @@ class UtilsOrderService extends AppServiceBase {
//查询支付流水号是否已经支付
var
receiptVoucher
=
orderResult
.
data
.
receiptVoucher
;
pobj
.
actionType
=
"queryOrderStatus"
;
var
url
=
this
.
centerAppUrl
+
"payment/paymentApi/
queryOrder
"
;
var
url
=
this
.
centerAppUrl
+
"payment/paymentApi/
springBoard
"
;
if
(
receiptVoucher
.
busPayOrderCode
!=
receiptVoucher
.
wxPayOrderCode
)
{
pobj
.
actionBody
.
trxid
=
wxPayOrderCode
;
pobj
.
actionBody
.
trxid
=
receiptVoucher
.
wxPayOrderCode
;
var
wxPayStatus
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
wxPayStatus
&&
wxPayStatus
.
code
==
1
&&
wxPayStatus
.
data
.
trxstatus
==
"0000"
)
{
if
(
wxPayStatus
&&
wxPayStatus
.
status
==
0
&&
wxPayStatus
.
data
.
trxstatus
==
"0000"
)
{
return
system
.
getResultFail
(
-
100130
,
"订单已支付,请勿重复付款,100130"
);
}
}
if
(
receiptVoucher
.
busPayOrderCode
!=
receiptVoucher
.
aliPayOrderCode
)
{
pobj
.
actionBody
.
trxid
=
aliPayOrderCode
;
pobj
.
actionBody
.
trxid
=
receiptVoucher
.
aliPayOrderCode
;
var
aliPayStatus
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
aliPayStatus
&&
aliPayStatus
.
code
==
1
&&
aliPayStatus
.
data
.
trxstatus
==
"0000"
)
{
if
(
aliPayStatus
&&
aliPayStatus
.
status
==
0
&&
aliPayStatus
.
data
.
trxstatus
==
"0000"
)
{
return
system
.
getResultFail
(
-
100140
,
"订单已支付,请勿重复付款,100140"
);
}
}
...
...
@@ -233,21 +233,21 @@ class UtilsOrderService extends AppServiceBase {
//更新DB付款信息
var
isPut
=
0
;
var
setField
=
{};
if
(
opType
==
"wx"
)
{
if
(
actionBody
.
opType
==
"wx"
)
{
if
(
actionBody
.
trxid
!=
receiptVoucher
.
wxPayOrderCode
)
{
setField
.
wxPayOrderCode
=
tR
esult
.
data
.
trxid
;
receiptVoucher
.
wxPayOrderCode
=
tR
esult
.
data
.
trxid
;
setField
.
wxPayOrderCode
=
r
esult
.
data
.
trxid
;
receiptVoucher
.
wxPayOrderCode
=
r
esult
.
data
.
trxid
;
isPut
=
1
;
}
}
else
{
//支付宝
if
(
actionBody
.
trxid
!=
receiptVoucher
.
aliPayOrderCode
)
{
setField
.
aliPayOrderCode
=
tR
esult
.
data
.
trxid
;
receiptVoucher
.
aliPayOrderCode
=
tR
esult
.
data
.
trxid
;
setField
.
aliPayOrderCode
=
r
esult
.
data
.
trxid
;
receiptVoucher
.
aliPayOrderCode
=
r
esult
.
data
.
trxid
;
isPut
=
1
;
}
}
pobj
.
actionBody
.
isPut
;
pobj
.
actionBody
.
isPut
=
isPut
;
pobj
.
actionBody
.
setField
=
setField
;
pobj
.
actionBody
.
receiptVoucherId
=
receiptVoucher
.
id
;
pobj
.
actionBody
.
trxid
=
result
.
data
.
trxid
;
...
...
center-channel/app/config/environment.js
View file @
81d28907
...
...
@@ -27,7 +27,7 @@ module.exports = function (app) {
app
.
all
(
'*'
,
function
(
req
,
res
,
next
)
{
req
.
objs
=
system
;
res
.
header
(
'Access-Control-Allow-Origin'
,
'*'
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild'
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild
,Authorization,XAPPKEY,XFROMAPPKEY,XFROMCOMPANYKEY,XREGROLE,XBIZPATH,token
'
);
res
.
header
(
'Access-Control-Allow-Methods'
,
'PUT, POST, GET, DELETE, OPTIONS'
);
// res.header('Access-Control-Allow-Credentials', 'true');
res
.
header
(
'content-type'
,
'text/html;charset=UTF-8'
);
...
...
center-channel/app/front/entry/public/apidoc/paymentDesc/payment.md
View file @
81d28907
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
获取pc端支付二维码--不跟订单关联
](
#getQrCode
)
1.
[
pc端订单支付二维码生成
](
#getOrderQrCode
)
1.
[
获取H5支付链接
](
#getH5PayUrl
)
## **<a name="getQrCode"> 获取pc端支付二维码--不跟订单关联</a>**
...
...
@@ -36,6 +37,41 @@
}
```
## **<a name="getOrderQrCode"> pc端订单支付二维码生成</a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/payment/paymentApi/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getOrderQrCode
```
javascript
{
"orderNo"
:
"TM22202008042050Pmex"
,
//订单号
"opType"
:
"wx"
// 支付方式 alipay阿里 wx微信
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
{
"payinfo"
:
"https://syb.allinpay.com/apiweb/h5unionpay/native?key=BMFvrMDcrqzLnJ04YV%2B02uX0"
,
"reqsn"
:
"qftTM22202008042050Pmex_22"
,
"chnltrxid"
:
"122005790000133940"
,
"trxid"
:
"122005790000133940"
,
"trxstatus"
:
"0000"
,
"notify_url"
:
"https://igirl.gongsibao.com/api/tl/zxNotify"
},
"requestId"
:
"07dedd4ffd4441dcac54c6d8a0f91653"
,
"wxPayOrderCode"
:
"122005790000133596"
,
"aliPayOrderCode"
:
"TM22202008042050Pmex"
}
```
## **<a name="getH5PayUrl"> 获取H5支付链接</a>**
[
返回到目录
](
#menu
)
##### 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