记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
7e340d2c
Commit
7e340d2c
authored
Feb 22, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改验签问题。
parent
1deac058
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
PayChannelStrategyAlipayImpl.java
...n/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
+1
-1
WepayStrategyMicropayImpl.java
...hannel/wepay/strategy/impl/WepayStrategyMicropayImpl.java
+2
-1
DragonOrdersServiceImpl.java
.../service/dragon/service/impl/DragonOrdersServiceImpl.java
+4
-3
PayWepayUtils.java
...ava/com/liquidnet/service/dragon/utils/PayWepayUtils.java
+7
-1
No files found.
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
View file @
7e340d2c
...
...
@@ -158,7 +158,7 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl
||
AlipayConstant
.
AlipayTradeStateEnum
.
TRADE_FINISHED
.
getCode
().
equals
(
resultMap
.
get
(
"tradeStatus"
)))
{
respDto
.
setStatus
(
Integer
.
valueOf
(
DragonConstant
.
PayStatusEnum
.
STATUS_PAID
.
getCode
()));
if
(
ordersDto
.
getPaymentType
().
equals
(
DragonConstant
.
PayTypeEnum
.
PAYMENT_TYPE_MICROPAY_ALIPAY
.
getCode
())){
this
.
completeSuccessOrder
(
ordersDto
,
resultMap
.
get
(
"trade_n
o"
).
toString
(),
LocalDateTime
.
now
(),
resultMap
.
toString
());
this
.
completeSuccessOrder
(
ordersDto
,
resultMap
.
get
(
"tradeN
o"
).
toString
(),
LocalDateTime
.
now
(),
resultMap
.
toString
());
}
}
else
{
respDto
.
setStatus
(
Integer
.
valueOf
(
DragonConstant
.
PayStatusEnum
.
STATUS_PAY_FAIL
.
getCode
()));
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/WepayStrategyMicropayImpl.java
View file @
7e340d2c
...
...
@@ -111,7 +111,8 @@ public class WepayStrategyMicropayImpl extends AbstractWepayStrategy {
}
// 当trade_state为SUCCESS时才返回result_code
if
(
"SUCCESS"
.
equals
(
resultMap
.
get
(
"trade_state"
)))
{
if
(
PayWepayUtils
.
getInstance
().
notifySign
(
resultMap
,
resultMap
.
get
(
"sign"
))){
String
sign
=
resultMap
.
remove
(
"sign"
);
if
(
PayWepayUtils
.
getInstance
().
notifySign
(
resultMap
,
sign
)){
// 修改订单状态等。
payChannelStrategyWepay
.
completeSuccessOrder
(
dragonOrdersDto
,
resultMap
.
get
(
"transaction_id"
),
LocalDateTime
.
now
(),
resultMap
.
toString
());
respDto
.
setStatus
(
Integer
.
valueOf
(
DragonConstant
.
PayStatusEnum
.
STATUS_PAID
.
getCode
()));
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrdersServiceImpl.java
View file @
7e340d2c
...
...
@@ -55,11 +55,12 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
if
(
StringUtil
.
isEmpty
(
ordersDto
)){
throw
new
LiquidnetServiceException
(
DragonErrorCodeEnum
.
TRADE_ERROR_NOT_EXISTS
.
getCode
(),
DragonErrorCodeEnum
.
TRADE_ERROR_NOT_EXISTS
.
getMessage
());
}
//如果已支付 直接返回结果
if
(!
ordersDto
.
getStatus
().
toString
().
equals
(
DragonConstant
.
PayStatusEnum
.
STATUS_UNPAID
.
getCode
())){
//如果已支付 直接返回结果 // MICROPAYWEPAY MICROPAYALIPAY
if
(!
ordersDto
.
getStatus
().
toString
().
equals
(
DragonConstant
.
PayStatusEnum
.
STATUS_UNPAID
.
getCode
())&&!
ordersDto
.
getPaymentType
().
equals
(
"MICROPAYALIPAY"
)&&!
ordersDto
.
getPaymentType
().
equals
(
"MICROPAYWEPAY"
)){
return
dragonPayBiz
.
buildPayOrderQueryRespDto
(
ordersDto
);
}
//如果未支付进行三方查询
//如果未支付进行三方查询
`
String
payType
=
DragonConstant
.
PayTypeEnum
.
getEnumByCode
(
ordersDto
.
getPaymentType
()).
getPayType
();
return
payChannelStrategyContext
.
getStrategy
(
payType
).
checkOrderStatus
(
code
);
}
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/utils/PayWepayUtils.java
View file @
7e340d2c
...
...
@@ -2,6 +2,7 @@ package com.liquidnet.service.dragon.utils;
import
com.alipay.api.internal.util.file.IOUtils
;
import
com.liquidnet.commons.lang.util.MD5Utils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.config.Registry
;
import
org.apache.http.config.RegistryBuilder
;
...
...
@@ -265,7 +266,12 @@ public class PayWepayUtils {
SortedMap
<
String
,
Object
>
smap
=
new
TreeMap
<
String
,
Object
>(
map
);
StringBuffer
sb
=
new
StringBuffer
();
for
(
Map
.
Entry
<
String
,
Object
>
m
:
smap
.
entrySet
())
{
sb
.
append
(
m
.
getKey
()).
append
(
"="
).
append
(
m
.
getValue
()).
append
(
"&"
);
if
(
null
!=
m
.
getValue
()){
if
(
StringUtils
.
isNotBlank
(
m
.
getValue
().
toString
())){
sb
.
append
(
m
.
getKey
()).
append
(
"="
).
append
(
m
.
getValue
()).
append
(
"&"
);
}
}
}
sb
.
delete
(
sb
.
length
()
-
1
,
sb
.
length
());
return
sb
.
toString
();
...
...
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