记得上下班打卡 | 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
77b920c8
Commit
77b920c8
authored
Jul 21, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改dragon配置
parent
bf56744a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
AbstractWepayStrategy.java
...on/channel/wepay/strategy/impl/AbstractWepayStrategy.java
+11
-2
WepayStrategyAppletImpl.java
.../channel/wepay/strategy/impl/WepayStrategyAppletImpl.java
+0
-1
WepayStrategyJsImpl.java
...agon/channel/wepay/strategy/impl/WepayStrategyJsImpl.java
+0
-1
No files found.
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 @
77b920c8
...
@@ -71,6 +71,8 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
...
@@ -71,6 +71,8 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
//构造支付请求xml
//构造支付请求xml
String
data
=
PayWepayUtils
.
getInstance
().
getRequestXml
(
parameters
);
String
data
=
PayWepayUtils
.
getInstance
().
getRequestXml
(
parameters
);
log
.
info
(
"dragonPay:wepay:"
+
dragonPayBaseReqDto
.
getDeviceFrom
()+
" request jsondata: {} "
,
data
);
HttpPost
httpost
=
new
HttpPost
(
this
.
getRequestUrl
());
HttpPost
httpost
=
new
HttpPost
(
this
.
getRequestUrl
());
httpost
.
setEntity
(
new
StringEntity
(
data
,
"UTF-8"
));
httpost
.
setEntity
(
new
StringEntity
(
data
,
"UTF-8"
));
CloseableHttpResponse
response
=
PayWepayUtils
.
getInstance
().
getHttpClient
().
execute
(
httpost
);
CloseableHttpResponse
response
=
PayWepayUtils
.
getInstance
().
getHttpClient
().
execute
(
httpost
);
...
@@ -78,8 +80,15 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
...
@@ -78,8 +80,15 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
//接受到返回信息
//接受到返回信息
String
xmlStr
=
EntityUtils
.
toString
(
response
.
getEntity
(),
"UTF-8"
);
String
xmlStr
=
EntityUtils
.
toString
(
response
.
getEntity
(),
"UTF-8"
);
EntityUtils
.
consume
(
entity
);
EntityUtils
.
consume
(
entity
);
log
.
info
(
"dragonPay:wepay:"
+
dragonPayBaseReqDto
.
getDeviceFrom
()+
" response xmlStr: {} "
,
xmlStr
);
log
.
info
(
"dragonPay:wepay:"
+
dragonPayBaseReqDto
.
getDeviceFrom
()+
" response jsonStr: {} "
,
xmlStr
);
WepayPayRespDto
respWepayDto
=
XmlUtil
.
toBean
(
xmlStr
,
WepayPayRespDto
.
class
);
WepayPayRespDto
respWepayDto
=
null
;
try
{
respWepayDto
=
XmlUtil
.
toBean
(
xmlStr
,
WepayPayRespDto
.
class
);
}
catch
(
Exception
e
)
{
log
.
error
(
"dragonPay:wepay:"
+
dragonPayBaseReqDto
.
getDeviceFrom
()+
" response format error: {} "
,
e
);
throw
new
LiquidnetServiceException
(
DragonErrorCodeEnum
.
TRADE_PARAM_ERROR
.
getCode
(),
DragonErrorCodeEnum
.
TRADE_PARAM_ERROR
.
getMessage
());
}
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getReturnCode
())){
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getReturnCode
())){
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getResultCode
())){
if
(
WepayConstant
.
WeixinTradeStateEnum
.
SUCCESS
.
getCode
().
equalsIgnoreCase
(
respWepayDto
.
getResultCode
())){
//构造公共返回参数
//构造公共返回参数
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/WepayStrategyAppletImpl.java
View file @
77b920c8
...
@@ -31,7 +31,6 @@ public class WepayStrategyAppletImpl extends AbstractWepayStrategy{
...
@@ -31,7 +31,6 @@ public class WepayStrategyAppletImpl extends AbstractWepayStrategy{
@Override
@Override
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
requestMap
.
put
(
"trade_type"
,
"JSAPI"
);
requestMap
.
put
(
"trade_type"
,
"JSAPI"
);
requestMap
.
put
(
"openid"
,
requestMap
.
get
(
"openId"
));
requestMap
.
put
(
"appid"
,
PayWepayUtils
.
getInstance
().
getAPPLET_APP_ID
());
requestMap
.
put
(
"appid"
,
PayWepayUtils
.
getInstance
().
getAPPLET_APP_ID
());
return
requestMap
;
return
requestMap
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/WepayStrategyJsImpl.java
View file @
77b920c8
...
@@ -31,7 +31,6 @@ public class WepayStrategyJsImpl extends AbstractWepayStrategy{
...
@@ -31,7 +31,6 @@ public class WepayStrategyJsImpl extends AbstractWepayStrategy{
@Override
@Override
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
SortedMap
<
String
,
Object
>
appendRequestParam
(
SortedMap
<
String
,
Object
>
requestMap
)
{
requestMap
.
put
(
"trade_type"
,
"JSAPI"
);
requestMap
.
put
(
"trade_type"
,
"JSAPI"
);
requestMap
.
put
(
"openid"
,
requestMap
.
get
(
"openId"
));
requestMap
.
put
(
"appid"
,
PayWepayUtils
.
getInstance
().
getJS_APP_ID
());
requestMap
.
put
(
"appid"
,
PayWepayUtils
.
getInstance
().
getJS_APP_ID
());
return
requestMap
;
return
requestMap
;
}
}
...
...
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