添加callback回调日志
This commit is contained in:
@@ -135,6 +135,7 @@ public class MyCardBizServiceImpl implements MyCardBizService {
|
||||
}
|
||||
String preHashValue = callback.getReturnCode() + callback.getPayResult() + callback.getFacTradeSeq() + callback.getPaymentType() + callback.getAmount() + callback.getCurrency() + callback.getMyCardTradeNo() + callback.getMyCardType() + callback.getPromoCode() + myCardConfig.getSecretKey();
|
||||
String hash = DigestUtils.sha256Hex(preHashValue).replaceAll(StrUtil.DASHED, StrUtil.EMPTY).toLowerCase();
|
||||
log.info("request hash : {}, preHashValue : {}, server hash : {}", callback.getHash(), preHashValue, hash);
|
||||
if (!hash.equals(callback.getHash())) {
|
||||
throw new ApiException("Hash校验失败");
|
||||
}
|
||||
|
Reference in New Issue
Block a user