Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
计全科技
jeepay
提交
f7ac74f6
jeepay
项目概览
计全科技
/
jeepay
通知
10
Star
3
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
6
Wiki
分析
仓库
DevOps
项目成员
Pages
jeepay
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
6
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
f7ac74f6
编写于
6月 16, 2021
作者:
terrfly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商户私钥 变更为商户应用私钥;
上级
252369f9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
7 deletion
+8
-7
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/ChannelNoticeController.java
...uan/jeepay/pay/ctrl/payorder/ChannelNoticeController.java
+1
-1
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/PayMchNotifyService.java
...a/com/jeequan/jeepay/pay/service/PayMchNotifyService.java
+7
-6
未找到文件。
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/ChannelNoticeController.java
浏览文件 @
f7ac74f6
...
...
@@ -127,7 +127,7 @@ public class ChannelNoticeController extends AbstractCtrl {
//包含通知地址时
if
(
hasReturnUrl
){
// 重定向
response
.
sendRedirect
(
payMchNotifyService
.
createReturnUrl
(
payOrder
,
mchAppConfigContext
.
getMch
Info
().
getPrivateKey
()));
response
.
sendRedirect
(
payMchNotifyService
.
createReturnUrl
(
payOrder
,
mchAppConfigContext
.
getMch
App
().
getAppSecret
()));
return
null
;
}
else
{
...
...
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/PayMchNotifyService.java
浏览文件 @
f7ac74f6
...
...
@@ -42,8 +42,8 @@ import org.springframework.stereotype.Service;
public
class
PayMchNotifyService
{
@Autowired
private
MchNotifyRecordService
mchNotifyRecordService
;
@Autowired
private
MchInfoService
mchInfoService
;
@Autowired
private
MqQueue4PayOrderMchNotify
mqPayOrderMchNotifyQueue
;
@Autowired
private
ConfigContextService
configContextService
;
/** 商户通知信息, 只有订单是终态,才会发送通知, 如明确成功和明确失败 **/
...
...
@@ -64,10 +64,11 @@ public class PayMchNotifyService {
return
;
}
//构建数据
MchInfo
mchInfo
=
mchInfoService
.
getById
(
dbPayOrder
.
getMchNo
());
//商户app私钥
String
appSecret
=
configContextService
.
getMchAppConfigContext
(
dbPayOrder
.
getMchNo
(),
dbPayOrder
.
getAppId
()).
getMchApp
().
getAppSecret
();
// 封装通知url
String
notifyUrl
=
createNotifyUrl
(
dbPayOrder
,
mchInfo
.
getPrivateKey
()
);
String
notifyUrl
=
createNotifyUrl
(
dbPayOrder
,
appSecret
);
mchNotifyRecord
=
new
MchNotifyRecord
();
mchNotifyRecord
.
setOrderId
(
dbPayOrder
.
getPayOrderId
());
mchNotifyRecord
.
setOrderType
(
MchNotifyRecord
.
TYPE_PAY_ORDER
);
...
...
@@ -93,14 +94,14 @@ public class PayMchNotifyService {
/**
* 创建响应URL
*/
public
String
createNotifyUrl
(
PayOrder
payOrder
,
String
mchKey
)
{
public
String
createNotifyUrl
(
PayOrder
payOrder
,
String
appSecret
)
{
QueryPayOrderRS
queryPayOrderRS
=
QueryPayOrderRS
.
buildByPayOrder
(
payOrder
);
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
toJSON
(
queryPayOrderRS
);
jsonObject
.
put
(
"reqTime"
,
System
.
currentTimeMillis
());
//添加请求时间
// 报文签名
jsonObject
.
put
(
"sign"
,
JeepayKit
.
getSign
(
jsonObject
,
mchKey
));
jsonObject
.
put
(
"sign"
,
JeepayKit
.
getSign
(
jsonObject
,
appSecret
));
// 生成通知
return
StringKit
.
appendUrlQuery
(
payOrder
.
getNotifyUrl
(),
jsonObject
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录