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
408d8fd0
Commit
408d8fd0
authored
Aug 06, 2020
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2e33c10e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
13 deletions
+49
-13
center-channel/app/base/api/impl/payment/paymentApi.js
+1
-1
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 @
408d8fd0
...
@@ -34,7 +34,7 @@ class PaymentAPI extends WEBBase {
...
@@ -34,7 +34,7 @@ class PaymentAPI extends WEBBase {
opResult
=
await
this
.
utilsOrderSve
.
getH5PayUrl
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOrderSve
.
getH5PayUrl
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"getOrderQrCode"
:
//pc端订单支付二维码生成
case
"getOrderQrCode"
:
//pc端订单支付二维码生成
opResult
=
await
this
.
utilsOrderSve
.
get
QrCodeInfo
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOrderSve
.
get
OrderQrCode
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
case
"queryOrderStatus"
:
//通联支付查询
case
"queryOrderStatus"
:
//通联支付查询
opResult
=
await
this
.
utilsOrderSve
.
queryOrderStatus
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOrderSve
.
queryOrderStatus
(
pobj
,
pobj
.
actionBody
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
408d8fd0
...
@@ -203,18 +203,18 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -203,18 +203,18 @@ class UtilsOrderService extends AppServiceBase {
//查询支付流水号是否已经支付
//查询支付流水号是否已经支付
var
receiptVoucher
=
orderResult
.
data
.
receiptVoucher
;
var
receiptVoucher
=
orderResult
.
data
.
receiptVoucher
;
pobj
.
actionType
=
"queryOrderStatus"
;
pobj
.
actionType
=
"queryOrderStatus"
;
var
url
=
this
.
centerAppUrl
+
"payment/paymentApi/
queryOrder
"
;
var
url
=
this
.
centerAppUrl
+
"payment/paymentApi/
springBoard
"
;
if
(
receiptVoucher
.
busPayOrderCode
!=
receiptVoucher
.
wxPayOrderCode
)
{
if
(
receiptVoucher
.
busPayOrderCode
!=
receiptVoucher
.
wxPayOrderCode
)
{
pobj
.
actionBody
.
trxid
=
wxPayOrderCode
;
pobj
.
actionBody
.
trxid
=
receiptVoucher
.
wxPayOrderCode
;
var
wxPayStatus
=
await
this
.
restPostUrl
(
pobj
,
url
);
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"
);
return
system
.
getResultFail
(
-
100130
,
"订单已支付,请勿重复付款,100130"
);
}
}
}
}
if
(
receiptVoucher
.
busPayOrderCode
!=
receiptVoucher
.
aliPayOrderCode
)
{
if
(
receiptVoucher
.
busPayOrderCode
!=
receiptVoucher
.
aliPayOrderCode
)
{
pobj
.
actionBody
.
trxid
=
aliPayOrderCode
;
pobj
.
actionBody
.
trxid
=
receiptVoucher
.
aliPayOrderCode
;
var
aliPayStatus
=
await
this
.
restPostUrl
(
pobj
,
url
);
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"
);
return
system
.
getResultFail
(
-
100140
,
"订单已支付,请勿重复付款,100140"
);
}
}
}
}
...
@@ -233,21 +233,21 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -233,21 +233,21 @@ class UtilsOrderService extends AppServiceBase {
//更新DB付款信息
//更新DB付款信息
var
isPut
=
0
;
var
isPut
=
0
;
var
setField
=
{};
var
setField
=
{};
if
(
opType
==
"wx"
)
{
if
(
actionBody
.
opType
==
"wx"
)
{
if
(
actionBody
.
trxid
!=
receiptVoucher
.
wxPayOrderCode
)
{
if
(
actionBody
.
trxid
!=
receiptVoucher
.
wxPayOrderCode
)
{
setField
.
wxPayOrderCode
=
tR
esult
.
data
.
trxid
;
setField
.
wxPayOrderCode
=
r
esult
.
data
.
trxid
;
receiptVoucher
.
wxPayOrderCode
=
tR
esult
.
data
.
trxid
;
receiptVoucher
.
wxPayOrderCode
=
r
esult
.
data
.
trxid
;
isPut
=
1
;
isPut
=
1
;
}
}
}
else
{
}
else
{
//支付宝
//支付宝
if
(
actionBody
.
trxid
!=
receiptVoucher
.
aliPayOrderCode
)
{
if
(
actionBody
.
trxid
!=
receiptVoucher
.
aliPayOrderCode
)
{
setField
.
aliPayOrderCode
=
tR
esult
.
data
.
trxid
;
setField
.
aliPayOrderCode
=
r
esult
.
data
.
trxid
;
receiptVoucher
.
aliPayOrderCode
=
tR
esult
.
data
.
trxid
;
receiptVoucher
.
aliPayOrderCode
=
r
esult
.
data
.
trxid
;
isPut
=
1
;
isPut
=
1
;
}
}
}
}
pobj
.
actionBody
.
isPut
;
pobj
.
actionBody
.
isPut
=
isPut
;
pobj
.
actionBody
.
setField
=
setField
;
pobj
.
actionBody
.
setField
=
setField
;
pobj
.
actionBody
.
receiptVoucherId
=
receiptVoucher
.
id
;
pobj
.
actionBody
.
receiptVoucherId
=
receiptVoucher
.
id
;
pobj
.
actionBody
.
trxid
=
result
.
data
.
trxid
;
pobj
.
actionBody
.
trxid
=
result
.
data
.
trxid
;
...
...
center-channel/app/config/environment.js
View file @
408d8fd0
...
@@ -27,7 +27,7 @@ module.exports = function (app) {
...
@@ -27,7 +27,7 @@ module.exports = function (app) {
app
.
all
(
'*'
,
function
(
req
,
res
,
next
)
{
app
.
all
(
'*'
,
function
(
req
,
res
,
next
)
{
req
.
objs
=
system
;
req
.
objs
=
system
;
res
.
header
(
'Access-Control-Allow-Origin'
,
'*'
);
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-Methods'
,
'PUT, POST, GET, DELETE, OPTIONS'
);
// res.header('Access-Control-Allow-Credentials', 'true');
// res.header('Access-Control-Allow-Credentials', 'true');
res
.
header
(
'content-type'
,
'text/html;charset=UTF-8'
);
res
.
header
(
'content-type'
,
'text/html;charset=UTF-8'
);
...
...
center-channel/app/front/entry/public/apidoc/paymentDesc/payment.md
View file @
408d8fd0
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
获取pc端支付二维码--不跟订单关联
](
#getQrCode
)
1.
[
获取pc端支付二维码--不跟订单关联
](
#getQrCode
)
1.
[
pc端订单支付二维码生成
](
#getOrderQrCode
)
1.
[
获取H5支付链接
](
#getH5PayUrl
)
1.
[
获取H5支付链接
](
#getH5PayUrl
)
## **<a name="getQrCode"> 获取pc端支付二维码--不跟订单关联</a>**
## **<a name="getQrCode"> 获取pc端支付二维码--不跟订单关联</a>**
...
@@ -36,6 +37,41 @@
...
@@ -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>**
## **<a name="getH5PayUrl"> 获取H5支付链接</a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
##### URL
##### 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