mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +08:00
✨
【支付模块】 修改时间 格式 yyyyMMddHHmmss 为 yyyy-MM-dd'T'HH:mm:ssXXX
This commit is contained in:
parent
29a384989b
commit
802a7b0a30
@ -28,11 +28,7 @@ import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString
|
|||||||
import static cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXCodeMapping.CODE_SUCCESS;
|
import static cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXCodeMapping.CODE_SUCCESS;
|
||||||
import static cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXCodeMapping.MESSAGE_SUCCESS;
|
import static cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXCodeMapping.MESSAGE_SUCCESS;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description: Native支付
|
|
||||||
* @author: zwy
|
|
||||||
* @date: 2022年04月18日 17:00
|
|
||||||
*/
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> {
|
public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> {
|
||||||
private WxPayService client;
|
private WxPayService client;
|
||||||
@ -95,7 +91,7 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> {
|
|||||||
.outTradeNo(reqDTO.getMerchantOrderId())
|
.outTradeNo(reqDTO.getMerchantOrderId())
|
||||||
.body(reqDTO.getBody())
|
.body(reqDTO.getBody())
|
||||||
.totalFee(reqDTO.getAmount().intValue()) // 单位分
|
.totalFee(reqDTO.getAmount().intValue()) // 单位分
|
||||||
// .timeExpire(DateUtil.format(reqDTO.getExpireTime(), "yyyyMMddHHmmss"))
|
.timeExpire(DateUtil.format(reqDTO.getExpireTime(), "yyyy-MM-dd'T'HH:mm:ssXXX"))
|
||||||
.spbillCreateIp(reqDTO.getUserIp())
|
.spbillCreateIp(reqDTO.getUserIp())
|
||||||
.notifyUrl(reqDTO.getNotifyUrl())
|
.notifyUrl(reqDTO.getNotifyUrl())
|
||||||
.productId(trade_type)
|
.productId(trade_type)
|
||||||
@ -126,7 +122,7 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> {
|
|||||||
// 转换结果
|
// 转换结果
|
||||||
return PayOrderNotifyRespDTO.builder().orderExtensionNo(notifyResult.getOutTradeNo())
|
return PayOrderNotifyRespDTO.builder().orderExtensionNo(notifyResult.getOutTradeNo())
|
||||||
.channelOrderNo(notifyResult.getTransactionId()).channelUserId(notifyResult.getOpenid())
|
.channelOrderNo(notifyResult.getTransactionId()).channelUserId(notifyResult.getOpenid())
|
||||||
.successTime(DateUtil.parse(notifyResult.getTimeEnd(), "yyyyMMddHHmmss"))
|
.successTime(DateUtil.parse(notifyResult.getTimeEnd(), "yyyy-MM-dd'T'HH:mm:ssXXX"))
|
||||||
.data(data.getBody()).build();
|
.data(data.getBody()).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> {
|
|||||||
// TODO 芋艿:貌似没 title?
|
// TODO 芋艿:貌似没 title?
|
||||||
.body(reqDTO.getBody())
|
.body(reqDTO.getBody())
|
||||||
.totalFee(reqDTO.getAmount().intValue()) // 单位分
|
.totalFee(reqDTO.getAmount().intValue()) // 单位分
|
||||||
.timeExpire(DateUtil.format(reqDTO.getExpireTime(), "yyyyMMddHHmmss"))
|
.timeExpire(DateUtil.format(reqDTO.getExpireTime(), "yyyy-MM-dd'T'HH:mm:ssXXX"))
|
||||||
.spbillCreateIp(reqDTO.getUserIp())
|
.spbillCreateIp(reqDTO.getUserIp())
|
||||||
.openid(getOpenid(reqDTO))
|
.openid(getOpenid(reqDTO))
|
||||||
.notifyUrl(reqDTO.getNotifyUrl())
|
.notifyUrl(reqDTO.getNotifyUrl())
|
||||||
@ -114,7 +114,7 @@ public class WXPubPayClient extends AbstractPayClient<WXPayClientConfig> {
|
|||||||
// TODO 芋艿:貌似没 title?
|
// TODO 芋艿:貌似没 title?
|
||||||
request.setDescription(reqDTO.getBody());
|
request.setDescription(reqDTO.getBody());
|
||||||
request.setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(reqDTO.getAmount().intValue())); // 单位分
|
request.setAmount(new WxPayUnifiedOrderV3Request.Amount().setTotal(reqDTO.getAmount().intValue())); // 单位分
|
||||||
request.setTimeExpire(DateUtil.format(reqDTO.getExpireTime(), "yyyyMMddHHmmss"));
|
request.setTimeExpire(DateUtil.format(reqDTO.getExpireTime(), "yyyy-MM-dd'T'HH:mm:ssXXX"));
|
||||||
request.setPayer(new WxPayUnifiedOrderV3Request.Payer().setOpenid(getOpenid(reqDTO)));
|
request.setPayer(new WxPayUnifiedOrderV3Request.Payer().setOpenid(getOpenid(reqDTO)));
|
||||||
request.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(reqDTO.getUserIp()));
|
request.setSceneInfo(new WxPayUnifiedOrderV3Request.SceneInfo().setPayerClientIp(reqDTO.getUserIp()));
|
||||||
request.setNotifyUrl(reqDTO.getNotifyUrl());
|
request.setNotifyUrl(reqDTO.getNotifyUrl());
|
||||||
|
Loading…
Reference in New Issue
Block a user