Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qianhe-slsy
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
xuwenhao
qianhe-slsy
Commits
79c81def
Commit
79c81def
authored
Apr 03, 2024
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改银行支付
parent
1d3caa6a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
qianhe-admin/src/main/java/com/qianhe/system/controller/CCBBackController.java
+1
-1
qianhe-admin/src/main/java/com/qianhe/system/controller/CCBPayController.java
+11
-2
No files found.
qianhe-admin/src/main/java/com/qianhe/system/controller/CCBBackController.java
View file @
79c81def
...
...
@@ -34,7 +34,7 @@ public class CCBBackController {
@Autowired
private
WaterOrderMapper
orderMapper
;
@PostMapping
(
"/
jh/notify
"
)
@PostMapping
(
"/
payNotify/
"
)
public
String
pay
(
CCBNotifyInfo
notifyInfo
)
{
log
.
info
(
"建行回调通知参数[{}]"
,
JSON
.
toJSONString
(
notifyInfo
));
String
src
=
"POSID="
+
notifyInfo
.
getPOSID
()
+
"&BRANCHID="
+
notifyInfo
.
getBRANCHID
()
+
"&ORDERID="
+
notifyInfo
.
getORDERID
()
+
...
...
qianhe-admin/src/main/java/com/qianhe/system/controller/CCBPayController.java
View file @
79c81def
package
com
.
qianhe
.
system
.
controller
;
import
cn.hutool.core.util.EscapeUtil
;
import
com.google.gson.Gson
;
import
com.qianhe.common.core.domain.AjaxResult
;
import
com.qianhe.system.domain.WaterGoods
;
import
com.qianhe.system.utils.MD5
;
import
org.apache.commons.lang3.StringEscapeUtils
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpPost
;
...
...
@@ -32,6 +34,10 @@ public class CCBPayController {
String
pk
=
""
;
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
EscapeUtil
.
escape
(
"中文"
));
}
/**
* 预支付订单生成入口
*/
...
...
@@ -45,7 +51,8 @@ public class CCBPayController {
//建行提供
String
BRANCHID
=
"370000000"
;
String
ORDERID
=
goods
.
getOrderNo
();
String
PAYMENT
=
goods
.
getTotalPrice
();
//支付金额为数字类型
Double
PAYMENT
=
Double
.
parseDouble
(
goods
.
getTotalPrice
());
String
CURCODE
=
"01"
;
String
TXCODE
=
"530590"
;
String
REMARK1
=
""
;
...
...
@@ -56,7 +63,8 @@ public class CCBPayController {
String
GATEWAY
=
"0"
;
String
CLIENTIP
=
"127.0.0.1"
;
String
REGINFO
=
""
;
String
PROINFO
=
goods
.
getTitle
();
//中文需要转义
String
PROINFO
=
goods
.
getOrderNo
();
String
REFERER
=
""
;
String
TRADE_TYPE
=
"MINIPRO"
;
//订水微信小程序appId
...
...
@@ -83,6 +91,7 @@ public class CCBPayController {
macStr
+=
"&TRADE_TYPE="
+
TRADE_TYPE
;
macStr
+=
"&SUB_APPID="
+
SUB_APPID
;
macStr
+=
"&SUB_OPENID="
+
SUB_OPENID
;
System
.
out
.
println
(
"------------------------------------------------------------------------"
+
macStr
);
//参与MAC计算所需参数具体看开发文档
String
macStrMd5
=
MD5
.
EncodeByMD5
(
macStr
);
...
...
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