记得上下班打卡 | git大法好,push需谨慎

Commit 461ce778 authored by 姜秀龙's avatar 姜秀龙

收钱吧-回调验签修复

parent f2bd54ae
......@@ -423,8 +423,11 @@ public class SqbBiz {
* 收钱吧回调推送验签
*/
public boolean verifySignature(CallbackParams callbackParams) {
// 签名原串 = eventId + timestamp + nonce + content
String plaintext = callbackParams.getEventId() + callbackParams.getTimestamp() + callbackParams.getNonce() + callbackParams.getContent();
// 签名原串 = eventId + timestamp + nonce + content(必须字符串拼接;Long+Long 会先按数字相加)
String plaintext = String.valueOf(callbackParams.getEventId())
+ String.valueOf(callbackParams.getTimestamp())
+ callbackParams.getNonce()
+ callbackParams.getContent();
return verifySignatureSHA256WithRSA(plaintext, callbackParams.getSignature(), sqbConfig.getPublicKey());
}
......
......@@ -429,6 +429,7 @@ public class GoblinSqbOrderServiceImpl implements IGoblinSqbOrderService {
// 可能需要根据收钱吧的orderSn查询正在的orderId
final String orderId = goblinSqbRedisUtils.getOrderIdBySqbOrderSn(sqbOrderSn);
if (StringUtil.isBlank(orderId)) return ResponseDto.failure("订单不存在");
GoblinSqbOrderVo orderVo = goblinSqbRedisUtils.getSqbOrder(orderId);
if (orderVo == null) return ResponseDto.failure("订单不存在");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment