Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
order-group-application
order-group
Commits
a6fba59b
Commit
a6fba59b
authored
Jan 14, 2022
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签名密钥取值修改与签名联调
parent
e69c769c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
+3
-2
order-application-service/src/main/java/cn/freemud/utils/HMacSHA256.java
+8
-1
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/PayServiceImpl.java
View file @
a6fba59b
...
@@ -1311,9 +1311,10 @@ public class PayServiceImpl {
...
@@ -1311,9 +1311,10 @@ public class PayServiceImpl {
plugInParameter
.
setSignMchid
(
signMchid
);
plugInParameter
.
setSignMchid
(
signMchid
);
plugInParameter
.
setStoreId
(
thirdStoreId
);
plugInParameter
.
setStoreId
(
thirdStoreId
);
String
message
=
"apply_mchid="
+
applyMchid
+
"&sign_mchid="
+
signMchid
+
"&store_id="
+
thirdStoreId
;
String
encryptKey
=
assortmentOpenPlatformPartnerPaymentAuth
.
getEncryptKey
();
String
message
=
"apply_mchid="
+
applyMchid
+
"&sign_mchid="
+
signMchid
+
"&store_id="
+
thirdStoreId
+
"&key="
+
encryptKey
;
String
sign
=
HMacSHA256
.
encrypt
(
message
,
assortmentOpenPlatformPartnerPaymentAuth
.
getPrivate_key
()
);
String
sign
=
HMacSHA256
.
encrypt
(
message
,
encryptKey
);
plugInParameter
.
setSign
(
sign
);
plugInParameter
.
setSign
(
sign
);
return
plugInParameter
;
return
plugInParameter
;
...
...
order-application-service/src/main/java/cn/freemud/utils/HMacSHA256.java
View file @
a6fba59b
...
@@ -42,7 +42,14 @@ public class HMacSHA256 {
...
@@ -42,7 +42,14 @@ public class HMacSHA256 {
hs
.
append
(
'0'
);
hs
.
append
(
'0'
);
hs
.
append
(
stmp
);
hs
.
append
(
stmp
);
}
}
return
hs
.
toString
().
to
Low
erCase
();
return
hs
.
toString
().
to
Upp
erCase
();
}
}
public
static
void
main
(
String
[]
args
)
{
String
mess
=
"apply_mchid=256151646&sign_mchid=301386006&store_id=21531295&key=4E07E532BCC2302B9E0ACEEC140B204F"
;
String
sss
=
encrypt
(
mess
,
"4E07E532BCC2302B9E0ACEEC140B204F"
);
System
.
out
.
println
();
}
}
}
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