微信支付

This commit is contained in:
TinyAnts 2023-03-22 16:06:04 +08:00
parent 6d52d34e41
commit ba6c0a2849
2 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,5 @@
package com.mdd.front.service; package com.mdd.front.service;
import com.github.binarywang.wxpay.bean.notify.SignatureHeader;
import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderV3Result; import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderV3Result;
import com.github.binarywang.wxpay.exception.WxPayException; import com.github.binarywang.wxpay.exception.WxPayException;
import com.mdd.front.validate.PaymentValidate; import com.mdd.front.validate.PaymentValidate;

View File

@ -53,6 +53,14 @@ public class PayServiceImpl implements IPayService {
@Resource @Resource
DevPayConfigMapper devPayConfigMapper; DevPayConfigMapper devPayConfigMapper;
/**
* 支付方式
*
* @author fzr
* @param from 场景
* @param terminal 总端
* @return List<PayWayListedVo>
*/
@Override @Override
public List<PayWayListedVo> payWay(String from, Integer terminal) { public List<PayWayListedVo> payWay(String from, Integer terminal) {
List<DevPayWay> devPayWays = devPayWayMapper.selectList( List<DevPayWay> devPayWays = devPayWayMapper.selectList(
@ -83,6 +91,7 @@ public class PayServiceImpl implements IPayService {
/** /**
* 微信支付 * 微信支付
* *
* @author fzr
* @param params 支付参数 * @param params 支付参数
* @param terminal 终端 * @param terminal 终端
* @throws Exception 异常 * @throws Exception 异常
@ -110,7 +119,7 @@ public class PayServiceImpl implements IPayService {
// 失效时间 // 失效时间
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
Long expireTime = System.currentTimeMillis() + 60 * 1000; Long expireTime = (System.currentTimeMillis() * 1000) + 1800;
String timeExpire = format.format(expireTime) + "+08:00"; String timeExpire = format.format(expireTime) + "+08:00";
// 订单信息 // 订单信息