微信支付参数缓存30分钟

This commit is contained in:
2024-03-25 15:37:54 +08:00
parent 9f5b032ce1
commit 7dfc793472
3 changed files with 12 additions and 0 deletions

View File

@@ -106,6 +106,10 @@ public class DelayMerchantProgramLogic extends AbstractProgramLogic {
// 返回微信支付参数
resultMap.put("weixinMap", weixinMap);
// 微信支付参数放redis WeChat Pay parameters
String redisKey = CacheConstants.ORDER_WECHAT_PAY_PARAMETERS + dto.getOrderCode();
redisCache.setCacheObject(redisKey, weixinMap, CacheConstants.cache_expire_time_30m);
} else if (StringUtils.equals(dto.getPayMode(), OrderPayModeEnum.PAYMENT_OF_WHITELIST.getValue())) { // 白名单支付
// 白名单支付可以直接调支付回调方法
dto.setPayAmount(Constants.whitelistDefaultAmount);

View File

@@ -215,6 +215,10 @@ public class NotDelayMerchantProgramLogic extends AbstractProgramLogic {
// 返回微信支付参数
resultMap.put("weixinMap", weixinMap);
// 微信支付参数放redis WeChat Pay parameters
String redisKey = CacheConstants.ORDER_WECHAT_PAY_PARAMETERS + dto.getOrderCode();
redisCache.setCacheObject(redisKey, weixinMap, CacheConstants.cache_expire_time_30m);
} else if (StringUtils.equals(dto.getPayMode(), OrderPayModeEnum.PAYMENT_OF_WHITELIST.getValue())) { // 白名单支付
// 白名单支付可以直接调支付回调方法
dto.setPayAmount(Constants.whitelistDefaultAmount);