记得上下班打卡 | 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
28b80054
Commit
28b80054
authored
Jul 26, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信支付
parent
4468b8d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
WepayStrategyAppImpl.java
...gon/channel/wepay/strategy/impl/WepayStrategyAppImpl.java
+6
-4
PayWepayUtils.java
...ava/com/liquidnet/service/dragon/utils/PayWepayUtils.java
+12
-0
No files found.
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/WepayStrategyAppImpl.java
View file @
28b80054
package
com
.
liquidnet
.
service
.
dragon
.
channel
.
wepay
.
strategy
.
impl
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayPayRespDto
;
import
com.liquidnet.service.dragon.channel.wepay.strategy.annotation.StrategyWepayHandler
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
...
...
@@ -41,12 +42,13 @@ public class WepayStrategyAppImpl extends AbstractWepayStrategy {
payBaseRespDto
.
getPayData
().
setPackages
(
"Sign=WXPay"
);
//设置签名
SortedMap
<
String
,
Object
>
paramMap
=
new
TreeMap
<
String
,
Object
>();
paramMap
.
put
(
"appid"
,
respDto
.
getAppi
d
());
paramMap
.
put
(
"partnerid"
,
respDto
.
getMch
Id
());
paramMap
.
put
(
"prepayid"
,
respDto
.
getPrepayId
());
paramMap
.
put
(
"appid"
,
payBaseRespDto
.
getPayData
().
getAppI
d
());
paramMap
.
put
(
"partnerid"
,
payBaseRespDto
.
getPayData
().
getPartner
Id
());
paramMap
.
put
(
"prepayid"
,
payBaseRespDto
.
getPayData
()
.
getPrepayId
());
paramMap
.
put
(
"package"
,
payBaseRespDto
.
getPayData
().
getPackages
());
paramMap
.
put
(
"noncestr"
,
respDto
.
getNonceStr
());
paramMap
.
put
(
"noncestr"
,
payBaseRespDto
.
getPayData
()
.
getNonceStr
());
paramMap
.
put
(
"timestamp"
,
payBaseRespDto
.
getPayData
().
getTimeStamp
());
log
.
info
(
"wepay sercond sign param :{} "
,
JsonUtils
.
toJson
(
paramMap
));
String
sign
=
PayWepayUtils
.
getInstance
().
createSign
(
paramMap
);
payBaseRespDto
.
getPayData
().
setPaySign
(
sign
);
return
payBaseRespDto
;
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/utils/PayWepayUtils.java
View file @
28b80054
...
...
@@ -209,4 +209,16 @@ public class PayWepayUtils {
sb
.
delete
(
sb
.
length
()
-
1
,
sb
.
length
());
return
sb
.
toString
();
}
public
static
void
main
(
String
[]
args
)
{
SortedMap
<
String
,
Object
>
paramMap
=
new
TreeMap
<
String
,
Object
>();
paramMap
.
put
(
"appid"
,
"wx86f9777acf2cb585"
);
paramMap
.
put
(
"partnerid"
,
"1551961491"
);
paramMap
.
put
(
"prepayid"
,
"wx26131443671359787bb3996a1fa0fc0000"
);
paramMap
.
put
(
"package"
,
"Sign=WXPay"
);
paramMap
.
put
(
"noncestr"
,
"rGcsOnNdZ4d9zu6k3yCbVJRG8Ombp8VW"
);
paramMap
.
put
(
"timestamp"
,
"1627276483"
);
String
sign
=
PayWepayUtils
.
getInstance
().
createSign
(
paramMap
);
System
.
out
.
println
(
"1627274771===="
+
sign
);
}
}
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