fix: 微信支付,接口bug修复。
This commit is contained in:
@@ -216,7 +216,8 @@ public class WeixinController extends BaseController {
|
||||
openId,
|
||||
request.getPayId(),
|
||||
request.getListDeviceId(),
|
||||
request.getJsCode()
|
||||
request.getJsCode(),
|
||||
wxPayNotifyProperties.getNotifyUrl()
|
||||
);
|
||||
|
||||
if (orderId == null || orderId <= 0) {
|
||||
|
||||
@@ -20,9 +20,10 @@ public interface PayOrderBusinessService {
|
||||
* @param payId 支付选项ID
|
||||
* @param deviceIds 设备ID列表
|
||||
* @param jsCode 微信登录code
|
||||
* @param notifyUrl 支付回调通知URL
|
||||
* @return 订单ID
|
||||
*/
|
||||
Long createPayOrder(Long userId, String openId, Integer payId, List<Long> deviceIds, String jsCode);
|
||||
Long createPayOrder(Long userId, String openId, Integer payId, List<Long> deviceIds, String jsCode, String notifyUrl);
|
||||
|
||||
/**
|
||||
* 根据商户订单号查询订单
|
||||
|
||||
@@ -46,7 +46,7 @@ public class PayOrderBusinessServiceImpl implements PayOrderBusinessService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long createPayOrder(Long userId, String openId, Integer payId, List<Long> deviceIds, String jsCode) {
|
||||
public Long createPayOrder(Long userId, String openId, Integer payId, List<Long> deviceIds, String jsCode, String notifyUrl) {
|
||||
// 1. 获取支付选项配置
|
||||
WxPayItemProperties.PayItem payItem = wxPayItemProperties.getPayItemById(payId);
|
||||
if (payItem == null) {
|
||||
@@ -92,6 +92,7 @@ public class PayOrderBusinessServiceImpl implements PayOrderBusinessService {
|
||||
order.setProfitStatus(0);
|
||||
order.setTradeType("JSAPI");
|
||||
order.setAttachment(String.valueOf(payId)); // 设置支付选项ID
|
||||
order.setNotifyUrl(notifyUrl); // 设置支付回调通知URL
|
||||
|
||||
payOrderMapper.insert(order);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user