记得上下班打卡 | 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
db2bed8b
Commit
db2bed8b
authored
Jul 14, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交支付查询
parent
5221188a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
13 deletions
+35
-13
liquidnet-service-dragon-dev.yml
...-config/liquidnet-config/liquidnet-service-dragon-dev.yml
+5
-0
PayChannelStrategyAlipayImpl.java
...n/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
+11
-3
AbstractWepayStrategy.java
...on/channel/wepay/strategy/impl/AbstractWepayStrategy.java
+19
-10
No files found.
liquidnet-bus-config/liquidnet-config/liquidnet-service-dragon-dev.yml
View file @
db2bed8b
...
@@ -26,6 +26,11 @@ liquidnet:
...
@@ -26,6 +26,11 @@ liquidnet:
url
:
https://devdragon.zhengzai.tv/dragon
url
:
https://devdragon.zhengzai.tv/dragon
alipay
:
alipay
:
gataway-url
:
https://openapi.alipay.com/gateway.do
gataway-url
:
https://openapi.alipay.com/gateway.do
appId
:
2019082866535131
merchantPubKey
:
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmePaETscydypY3rV4mXa8MtcQIL5zjP1KxdusNkHpePeU61hAZxKn0Z8pDB1wNaTK72wgEWaORXeRp4YTbf4usHlW562Pe5wdiSutb3iT6EM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4sX0NL7ACBe7Rl1RcU9Mq5XuHhnkveFBVRRIHindzUfEN0WgdLy23qmJ2N+1i4FigelY0E5T2lojVb7wycAgAc6vflwE+eYf8W3968q0QKBgQCkRgsVCWWNMSLZeB0V9LV3Om2/UPWY/ovadTxAQtxg0Z75V6Wdu8u0hrYaPSeUK2ryaoE6HKgp7U8NiJGzgm2wpj7D2ysrPmhX5+CjiWkDMCuvWytVT7hLqhhLp7frZT39u8VhyfC8lE0xA67gAPsGSl1sBoZPwvvsmNAQ/h6rlQKBgQCtCtw9be2m88M3JnieYhOax8Po2u5qsLZoBBcKqLhXf7ISbhPWNFXwwJ29jxicoR5J1O3lIj09fVFxuLX0Pb3DXn2VksjLz8Wp0vx8eUHEeRis8xdleaf4C68du/WemOHjw8VvUWQSOVWjc/vwiumYA+K5LQAXWAXM0c1jP+e3UQKBgEWY/1z8TDATn0Yvo3MH6FIJSTIDJOqa/bmibdJ0AVZruUS+o4Y+aEGlyUU4n6og8wCdqv5p4b1Rs2pyb/hzy/FJndHw60s495A2x2/B6eHV6Mw0fhl42wYDnKOA/WUX0bnMcgXKPtpGoqWff9mb0L6LhyUbZpAodf95hr2MTIY5AoGBAIyPtYP6jRyR980h/Ud1MS0fBxymjQrR+kg3GWjnw0ZJJ8yFEXxDqLV8uLyXQKc89HGbI0cClWgZBTjfIPJ5U4Gl19Xlwx1SFrdgg5mGUqnMARTg7w1TG5QLSqNhZo2jgBM5FCJRbDUCO/MzLcFhTeGNva9yP7E7gW5/Dott9D7d
signtType
:
2019082866535131
charset
:
2019082866535131
wepay
:
wepay
:
gataway-url
:
https://openapi.alipay.com/gateway.do
gataway-url
:
https://openapi.alipay.com/gateway.do
merchantId
:
1551961491
merchantId
:
1551961491
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
View file @
db2bed8b
...
@@ -56,8 +56,16 @@ public class PayChannelStrategyAlipayImpl implements IPayChannelStrategy {
...
@@ -56,8 +56,16 @@ public class PayChannelStrategyAlipayImpl implements IPayChannelStrategy {
@Autowired
@Autowired
private
DragonOrderRefundsServiceImpl
dragonOrderRefundsService
;
private
DragonOrderRefundsServiceImpl
dragonOrderRefundsService
;
@Value
(
"${liquidnet.dragon.wepay.partnerKey}"
)
@Value
(
"${liquidnet.dragon.alipay.appId}"
)
private
String
partnerKey
;
private
String
appId
;
@Value
(
"${liquidnet.dragon.alipay.merchantPubKey}"
)
private
String
merchantPubKey
;
@Value
(
"${liquidnet.dragon.alipay.merchantPrivateKey}"
)
private
String
merchantPrivateKey
;
@Value
(
"${liquidnet.dragon.alipay.signtType}"
)
private
String
signtType
;
@Value
(
"${liquidnet.dragon.alipay.charset}"
)
private
String
charset
;
@Override
@Override
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
)
{
public
ResponseDto
<
DragonPayBaseRespDto
>
dragonPay
(
DragonPayBaseReqDto
dragonPayBaseReqDto
)
{
...
@@ -91,7 +99,7 @@ public class PayChannelStrategyAlipayImpl implements IPayChannelStrategy {
...
@@ -91,7 +99,7 @@ public class PayChannelStrategyAlipayImpl implements IPayChannelStrategy {
}
}
try
{
try
{
if
(
AlipaySignature
.
rsaCheckV1
(
notifyMap
,
partner
Key
,
"UTF-8"
,
"RSA2"
)){
if
(
AlipaySignature
.
rsaCheckV1
(
notifyMap
,
merchantPub
Key
,
"UTF-8"
,
"RSA2"
)){
String
tradeStatus
=
notifyMap
.
get
(
"trade_status"
);
String
tradeStatus
=
notifyMap
.
get
(
"trade_status"
);
if
(
AlipayConstant
.
AlipayTradeStateEnum
.
TRADE_FINISHED
.
name
().
equals
(
tradeStatus
))
{
if
(
AlipayConstant
.
AlipayTradeStateEnum
.
TRADE_FINISHED
.
name
().
equals
(
tradeStatus
))
{
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/AbstractWepayStrategy.java
View file @
db2bed8b
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
wepay
.
strategy
.
impl
;
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
wepay
.
strategy
.
impl
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.channel.wepay.biz.WepayBiz
;
import
com.liquidnet.service.dragon.channel.wepay.biz.WepayBiz
;
import
com.liquidnet.service.dragon.channel.wepay.constant.WepayConstant
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayOrderQueryRespDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayOrderQueryRespDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayPayRespDto
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayPayRespDto
;
import
com.liquidnet.service.dragon.channel.wepay.strategy.IWepayStrategy
;
import
com.liquidnet.service.dragon.channel.wepay.strategy.IWepayStrategy
;
import
com.liquidnet.service.dragon.constant.DragonErrorCodeEnum
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseReqDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseReqDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto
;
import
com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto
;
...
@@ -61,7 +64,8 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
...
@@ -61,7 +64,8 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
EntityUtils
.
consume
(
entity
);
EntityUtils
.
consume
(
entity
);
log
.
info
(
"dragonPay:wepay:wap response xmlStr: {} "
,
xmlStr
);
log
.
info
(
"dragonPay:wepay:wap response xmlStr: {} "
,
xmlStr
);
WepayPayRespDto
respWepayDto
=
XmlUtil
.
toBean
(
xmlStr
,
WepayPayRespDto
.
class
);
WepayPayRespDto
respWepayDto
=
XmlUtil
.
toBean
(
xmlStr
,
WepayPayRespDto
.
class
);
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getReturnCode
())){
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getResultCode
())){
//构造公共返回参数
//构造公共返回参数
DragonPayBaseRespDto
respPayDto
=
this
.
buildCommonRespDto
(
dragonPayBaseReqDto
,
respWepayDto
);
DragonPayBaseRespDto
respPayDto
=
this
.
buildCommonRespDto
(
dragonPayBaseReqDto
,
respWepayDto
);
//构造自定义返回参数
//构造自定义返回参数
...
@@ -69,8 +73,13 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
...
@@ -69,8 +73,13 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
//支付订单持久化
//支付订单持久化
wepayBiz
.
buildPayOrders
(
dragonPayBaseReqDto
,
respPayDto
);
wepayBiz
.
buildPayOrders
(
dragonPayBaseReqDto
,
respPayDto
);
return
ResponseDto
.
success
(
respPayDto
);
return
ResponseDto
.
success
(
respPayDto
);
}
else
{
throw
new
LiquidnetServiceException
(
DragonErrorCodeEnum
.
TRADE_PARAM_ERROR
.
getCode
(),
DragonErrorCodeEnum
.
TRADE_PARAM_ERROR
.
getMessage
());
}
}
else
{
throw
new
LiquidnetServiceException
(
DragonErrorCodeEnum
.
TRADE_PARAM_ERROR
.
getCode
(),
DragonErrorCodeEnum
.
TRADE_PARAM_ERROR
.
getMessage
());
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
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