Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-support-rlwx
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
rl
hls-support-rlwx
Commits
e4df144b
Commit
e4df144b
authored
Apr 27, 2022
by
胡建龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20220427 封装cmb.properties文件
parent
b014a6af
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
100 deletions
+108
-100
HclcCmbPolyServiceImpl.java
...com/hand/app/cmb/service/impl/HclcCmbPolyServiceImpl.java
+46
-97
Utils.java
core/src/main/java/com/hand/app/cmb/util/Utils.java
+35
-3
cmb.properties
core/src/main/resources/cmb.properties
+27
-0
No files found.
core/src/main/java/com/hand/app/cmb/service/impl/HclcCmbPolyServiceImpl.java
View file @
e4df144b
This diff is collapsed.
Click to expand it.
core/src/main/java/com/hand/app/cmb/util/Utils.java
View file @
e4df144b
package
com
.
hand
.
app
.
cmb
.
util
;
import
com.alibaba.fastjson.JSONObject
;
import
com.chinapay.secss.LogUtil
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.client.HttpClient
;
...
...
@@ -18,9 +19,7 @@ import org.springframework.http.converter.StringHttpMessageConverter;
import
org.springframework.web.client.RestTemplate
;
import
javax.net.ssl.*
;
import
java.io.BufferedReader
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.io.*
;
import
java.nio.charset.Charset
;
import
java.nio.charset.StandardCharsets
;
import
java.security.KeyManagementException
;
...
...
@@ -39,13 +38,16 @@ public class Utils {
try
{
// Create a trust manager that does not validate certificate chains
TrustManager
[]
trustAllCerts
=
new
TrustManager
[]{
new
X509TrustManager
()
{
@Override
public
X509Certificate
[]
getAcceptedIssuers
()
{
return
null
;
}
@Override
public
void
checkClientTrusted
(
X509Certificate
[]
certs
,
String
authType
)
{
}
@Override
public
void
checkServerTrusted
(
X509Certificate
[]
certs
,
String
authType
)
{
}
}
...
...
@@ -57,6 +59,7 @@ public class Utils {
// Create all-trusting host name verifier
HostnameVerifier
allHostsValid
=
new
HostnameVerifier
()
{
@Override
public
boolean
verify
(
String
hostname
,
SSLSession
session
)
{
return
true
;
}
...
...
@@ -168,4 +171,33 @@ public class Utils {
return
paramMap
;
}
/**
* 加载properties配置文件
* @param propPath
* @return
*/
public
static
Properties
loadProp
(
String
propPath
)
{
Properties
props
=
new
Properties
();
FileInputStream
is
=
null
;
try
{
is
=
new
FileInputStream
(
propPath
);
props
.
load
(
is
);
return
props
;
}
catch
(
Exception
var13
)
{
LogUtil
.
writeErrorLog
(
"加载配置文件失败"
,
var13
);
}
finally
{
if
(
is
!=
null
)
{
try
{
is
.
close
();
}
catch
(
IOException
var12
)
{
;
}
}
}
return
null
;
}
}
core/src/main/resources/cmb.properties
0 → 100644
View file @
e4df144b
#招行获取二维码接口
cmb.qrCodeapplyUrl
=
https://api.cmburl.cn:8065/polypay/v1.0/mchorders/qrcodeapply
#招行查询订单状态接口
cmb.orderQueryUrl
=
https://api.cmburl.cn:8065/polypay/v1.0/mchorders/orderquery
#招行关闭订单接口
cmb.closeUrl
=
https://api.cmburl.cn:8065/polypay/v1.0/mchorders/qrcodeapply
#uat环境商户国密私钥
cmb.privateKey
=
D5F2AFA24E6BA9071B54A8C9AD735F9A1DE9C4657FA386C09B592694BC118B38
#uat环境招行国密公钥
cmb.publicKey
=
MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAE6Q+fktsnY9OFP+LpSR5Udbxf5zHCFO0PmOKlFNTxDIGl8jsPbbB/9ET23NV+acSz4FEkzD74sW2iiNVHRLiKHg==
cmb.appId
=
8ab74856-8772-45c9-96db-54cb30ab9f74
cmb.appSecret
=
5b96f20a-011f-4254-8be8-9a5ceb2f317f
cmb.server
=
cmbServer
cmb.version
=
0.0.1
cmb.encoding
=
UTF-8
cmb.signMethod
=
02
cmb.currencyCode
=
156
cmb.user.id
=
N003574551
cmb.mer.id
=
3089991701201D0
cmb.payValidTime
=
900
cmb.notifyUrl
=
http://sign.hitachics.com/core/api/public/cmb/get/qr/code/listen
\ No newline at end of file
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