pay notify
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,3 +12,4 @@ buildNumber.properties
|
|||||||
/.idea/
|
/.idea/
|
||||||
/src/test/
|
/src/test/
|
||||||
peanut_book.iml
|
peanut_book.iml
|
||||||
|
weChatConfig.properties
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -478,7 +478,7 @@
|
|||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>com.e-iceblue</id>
|
<id>com.e-iceblue</id>
|
||||||
<url>http://repo.e-iceblue.cn/repository/maven-public/</url>
|
<url>https://repo.e-iceblue.cn/repository/maven-public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
|
|||||||
@@ -9,6 +9,5 @@ import java.util.List;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface ShopProudictBookDao extends BaseMapper<ShopProudictBookEntity> {
|
public interface ShopProudictBookDao extends BaseMapper<ShopProudictBookEntity> {
|
||||||
|
|
||||||
|
List<Integer> getOrderBookId(String orderSn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import com.peanut.modules.book.entity.UserEbookBuyEntity;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户购买书籍表
|
* 用户购买书籍表
|
||||||
*
|
*
|
||||||
@@ -15,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface UserEbookBuyDao extends MPJBaseMapper<UserEbookBuyEntity> {
|
public interface UserEbookBuyDao extends MPJBaseMapper<UserEbookBuyEntity> {
|
||||||
|
|
||||||
|
List<Integer> getUserBookId(Integer userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,6 @@ public interface ShopProudictBookService extends IService<ShopProudictBookEntity
|
|||||||
|
|
||||||
Integer getProductByBookId(Integer bookId);
|
Integer getProductByBookId(Integer bookId);
|
||||||
|
|
||||||
|
List<Integer> getOrderBookId(String orderSn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.peanut.common.utils.PageUtils;
|
import com.peanut.common.utils.PageUtils;
|
||||||
import com.peanut.modules.book.entity.UserEbookBuyEntity;
|
import com.peanut.modules.book.entity.UserEbookBuyEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,6 +20,8 @@ public interface UserEbookBuyService extends IService<UserEbookBuyEntity> {
|
|||||||
|
|
||||||
PageUtils queryPages(Map<String, Object> params);
|
PageUtils queryPages(Map<String, Object> params);
|
||||||
|
|
||||||
|
List<Integer> getUserBookId(Integer userId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,37 +4,36 @@ import com.aliyun.oss.OSS;
|
|||||||
import com.aliyun.oss.OSSClientBuilder;
|
import com.aliyun.oss.OSSClientBuilder;
|
||||||
import com.aliyun.oss.OSSException;
|
import com.aliyun.oss.OSSException;
|
||||||
import com.aliyun.oss.model.OSSObject;
|
import com.aliyun.oss.model.OSSObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import com.peanut.common.utils.*;
|
import com.peanut.common.utils.ConstantPropertiesUtils;
|
||||||
|
import com.peanut.common.utils.FileDownloadUtil;
|
||||||
|
import com.peanut.common.utils.PageUtils;
|
||||||
|
import com.peanut.common.utils.Query;
|
||||||
|
import com.peanut.modules.book.dao.BookDao;
|
||||||
import com.peanut.modules.book.entity.*;
|
import com.peanut.modules.book.entity.*;
|
||||||
import com.peanut.modules.book.entity.SysDictDataEntity;
|
import com.peanut.modules.book.service.BookChapterService;
|
||||||
import com.peanut.modules.book.service.*;
|
import com.peanut.modules.book.service.BookForumArticlesService;
|
||||||
import com.peanut.modules.book.vo.BookIndexVo;
|
import com.peanut.modules.book.service.BookService;
|
||||||
|
import com.peanut.modules.book.service.PublisherService;
|
||||||
import com.peanut.modules.sys.service.SysDictDataService;
|
import com.peanut.modules.sys.service.SysDictDataService;
|
||||||
import com.spire.doc.Document;
|
import com.spire.doc.Document;
|
||||||
import com.spire.doc.Section;
|
import com.spire.doc.Section;
|
||||||
import com.spire.doc.documents.Paragraph;
|
import com.spire.doc.documents.Paragraph;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.net.URLDecoder;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
|
|
||||||
import com.peanut.modules.book.dao.BookDao;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
|
|
||||||
|
|
||||||
@Service("bookService")
|
@Service("bookService")
|
||||||
public class BookServiceImpl extends ServiceImpl<BookDao, BookEntity> implements BookService {
|
public class BookServiceImpl extends ServiceImpl<BookDao, BookEntity> implements BookService {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
package com.peanut.modules.book.service.impl;
|
package com.peanut.modules.book.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -15,6 +16,7 @@ import com.peanut.modules.book.service.ShopProudictBookService;
|
|||||||
import com.peanut.modules.book.vo.ProudictBookqueryVO;
|
import com.peanut.modules.book.vo.ProudictBookqueryVO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -26,6 +28,8 @@ public class ShopProudictBookServiceImpl extends ServiceImpl<ShopProudictBookDa
|
|||||||
private ShopProductService shopProductService;
|
private ShopProductService shopProductService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private BookService bookService;
|
private BookService bookService;
|
||||||
|
@Autowired
|
||||||
|
private ShopProudictBookDao shopProudictBookDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils queryPage(Map<String, Object> params) {
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
@@ -108,5 +112,10 @@ public class ShopProudictBookServiceImpl extends ServiceImpl<ShopProudictBookDa
|
|||||||
return shopProductEntity.getProductId();
|
return shopProductEntity.getProductId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Integer> getOrderBookId(String orderSn) {
|
||||||
|
return shopProudictBookDao.getOrderBookId(orderSn);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,26 @@
|
|||||||
package com.peanut.modules.book.service.impl;
|
package com.peanut.modules.book.service.impl;
|
||||||
|
|
||||||
import com.peanut.modules.book.entity.BuyOrderEntity;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.peanut.common.utils.PageUtils;
|
import com.peanut.common.utils.PageUtils;
|
||||||
import com.peanut.common.utils.Query;
|
import com.peanut.common.utils.Query;
|
||||||
|
|
||||||
import com.peanut.modules.book.dao.UserEbookBuyDao;
|
import com.peanut.modules.book.dao.UserEbookBuyDao;
|
||||||
import com.peanut.modules.book.entity.UserEbookBuyEntity;
|
import com.peanut.modules.book.entity.UserEbookBuyEntity;
|
||||||
import com.peanut.modules.book.service.UserEbookBuyService;
|
import com.peanut.modules.book.service.UserEbookBuyService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
@Service("userEbookBuyService")
|
@Service("userEbookBuyService")
|
||||||
public class UserEbookBuyServiceImpl extends ServiceImpl<UserEbookBuyDao, UserEbookBuyEntity> implements UserEbookBuyService {
|
public class UserEbookBuyServiceImpl extends ServiceImpl<UserEbookBuyDao, UserEbookBuyEntity> implements UserEbookBuyService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserEbookBuyDao userEbookBuyDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils queryPage(Map<String, Object> params) {
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
String userId = (String) params.get("userId");
|
String userId = (String) params.get("userId");
|
||||||
@@ -44,24 +46,10 @@ public class UserEbookBuyServiceImpl extends ServiceImpl<UserEbookBuyDao, UserEb
|
|||||||
return new PageUtils(page);
|
return new PageUtils(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Integer> getUserBookId(Integer userId) {
|
||||||
|
return userEbookBuyDao.getUserBookId(userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
package com.peanut.modules.pay.weChatPay.controller;
|
package com.peanut.modules.pay.weChatPay.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.TypeReference;
|
import com.alibaba.fastjson.TypeReference;
|
||||||
@@ -6,10 +7,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.peanut.common.utils.R;
|
import com.peanut.common.utils.R;
|
||||||
import com.peanut.modules.book.entity.*;
|
import com.peanut.modules.book.entity.*;
|
||||||
import com.peanut.modules.book.service.*;
|
import com.peanut.modules.book.service.*;
|
||||||
import com.peanut.modules.pay.weChatPay.dto.WechatDto;
|
|
||||||
import com.peanut.modules.pay.weChatPay.config.WechatPayConfig;
|
import com.peanut.modules.pay.weChatPay.config.WechatPayConfig;
|
||||||
|
import com.peanut.modules.pay.weChatPay.dto.WechatDto;
|
||||||
import com.peanut.modules.pay.weChatPay.util.HttpUtils;
|
import com.peanut.modules.pay.weChatPay.util.HttpUtils;
|
||||||
import com.peanut.modules.book.entity.BookBuyConfigEntity;
|
|
||||||
import com.peanut.modules.pay.weChatPay.util.WechatPayValidator;
|
import com.peanut.modules.pay.weChatPay.util.WechatPayValidator;
|
||||||
import com.peanut.modules.pay.weChatPay.util.WxPayUtil;
|
import com.peanut.modules.pay.weChatPay.util.WxPayUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -24,10 +24,9 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.xml.soap.Text;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@@ -37,14 +36,7 @@ import java.security.NoSuchAlgorithmException;
|
|||||||
import java.security.PrivateKey;
|
import java.security.PrivateKey;
|
||||||
import java.security.spec.InvalidKeySpecException;
|
import java.security.spec.InvalidKeySpecException;
|
||||||
import java.security.spec.PKCS8EncodedKeySpec;
|
import java.security.spec.PKCS8EncodedKeySpec;
|
||||||
import java.text.DateFormat;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.time.Instant;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.time.temporal.ChronoUnit;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@@ -53,9 +45,11 @@ import java.util.concurrent.locks.ReentrantLock;
|
|||||||
@Configuration
|
@Configuration
|
||||||
public class WeChatPayController {
|
public class WeChatPayController {
|
||||||
|
|
||||||
@Autowired private MyUserService userService;
|
@Autowired
|
||||||
|
private MyUserService userService;
|
||||||
|
|
||||||
@Autowired private BuyOrderService buyOrderService;
|
@Autowired
|
||||||
|
private BuyOrderService buyOrderService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@Lazy
|
@Lazy
|
||||||
@@ -74,15 +68,16 @@ public class WeChatPayController {
|
|||||||
private TransactionDetailsService transactionDetailsService;
|
private TransactionDetailsService transactionDetailsService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BuyOrderDetailService buyOrderDetailService;
|
private ShopProudictBookService shopProudictBookService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CloseableHttpClient wxPayNoSignClient; //无需应答签名
|
private UserEbookBuyService userEbookBuyService;
|
||||||
|
|
||||||
|
//无需应答签名
|
||||||
@Autowired
|
@Autowired
|
||||||
private CloseableHttpClient wxPayClient;
|
private CloseableHttpClient wxPayClient;
|
||||||
@Autowired
|
@Autowired
|
||||||
private WxPayUtil wxPayUtil;
|
private WxPayUtil wxPayUtil;
|
||||||
private final ReentrantLock lock = new ReentrantLock();
|
|
||||||
// 由微信生成的应用ID,全局唯一。
|
// 由微信生成的应用ID,全局唯一。
|
||||||
public static final String appId = "wx47134a8f15083734";
|
public static final String appId = "wx47134a8f15083734";
|
||||||
// 直连商户的商户号,由微信支付生成并下发。
|
// 直连商户的商户号,由微信支付生成并下发。
|
||||||
@@ -136,8 +131,6 @@ public class WeChatPayController {
|
|||||||
if (dto.getTotalAmount() != order.getRealMoney()) {
|
if (dto.getTotalAmount() != order.getRealMoney()) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
paramMap.put("amount", amountMap);
|
paramMap.put("amount", amountMap);
|
||||||
|
|
||||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(paramMap));
|
JSONObject json = JSONObject.parseObject(JSON.toJSONString(paramMap));
|
||||||
@@ -205,6 +198,7 @@ public class WeChatPayController {
|
|||||||
return R.ok().put("paramMap", paramMap).put("Map", Map);
|
return R.ok().put("paramMap", paramMap).put("Map", Map);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取私钥。
|
* 获取私钥。
|
||||||
*
|
*
|
||||||
@@ -227,8 +221,8 @@ public class WeChatPayController {
|
|||||||
throw new RuntimeException("无效的密钥格式");
|
throw new RuntimeException("无效的密钥格式");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* 微信支付回调
|
* 微信支付回调
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
@@ -236,25 +230,21 @@ public class WeChatPayController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/payNotify")
|
@PostMapping("/payNotify")
|
||||||
|
@Transactional
|
||||||
public R payNotify(HttpServletRequest request, HttpServletResponse response) {
|
public R payNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||||
log.info("##############################微信支付回调#######################");
|
log.info("微信支付回调");
|
||||||
|
|
||||||
|
|
||||||
// 处理通知参数
|
// 处理通知参数
|
||||||
Map<String, Object> bodyMap = getNotifyBody(request);
|
Map<String, Object> bodyMap = getNotifyBody(request);
|
||||||
if (bodyMap == null) {
|
if (bodyMap == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if(lock.tryLock()) {
|
|
||||||
try {
|
|
||||||
// 解密resource中的通知数据
|
// 解密resource中的通知数据
|
||||||
String resource = bodyMap.get("resource").toString();
|
String resource = bodyMap.get("resource").toString();
|
||||||
Map<String, Object> resourceMap = WechatPayValidator.decryptFromResource(resource, wechatPayConfig.getApiV3Key(), 1);
|
Map<String, Object> resourceMap = WechatPayValidator.decryptFromResource(resource, wechatPayConfig.getApiV3Key(), 1);
|
||||||
String orderNo = resourceMap.get("out_trade_no").toString();
|
String orderNo = resourceMap.get("out_trade_no").toString();
|
||||||
String transactionId = resourceMap.get("transaction_id").toString();
|
|
||||||
// 根据订单号,做幂等处理,并且在对业务数据进行状态检查和处理之前,要采用数据锁进行并发控制,以避免函数重入造成的数据混乱
|
// 根据订单号,做幂等处理,并且在对业务数据进行状态检查和处理之前,要采用数据锁进行并发控制,以避免函数重入造成的数据混乱
|
||||||
BuyOrderEntity order = this.buyOrderService.getOne(new QueryWrapper<BuyOrderEntity>().eq("order_sn", orderNo));
|
BuyOrderEntity order = this.buyOrderService.getOne(new QueryWrapper<BuyOrderEntity>().eq("order_sn", orderNo));
|
||||||
PayWechatOrderEntity wechatEntity = new PayWechatOrderEntity();
|
PayWechatOrderEntity wechatEntity;
|
||||||
if (!ObjectUtils.isEmpty(order)) {
|
if (!ObjectUtils.isEmpty(order)) {
|
||||||
wechatEntity = this.payWechatOrderService.getOne(new QueryWrapper<PayWechatOrderEntity>().eq("order_sn", order.getOrderSn()));
|
wechatEntity = this.payWechatOrderService.getOne(new QueryWrapper<PayWechatOrderEntity>().eq("order_sn", order.getOrderSn()));
|
||||||
} else {
|
} else {
|
||||||
@@ -265,20 +255,34 @@ public class WeChatPayController {
|
|||||||
if ("order".equals(order.getOrderType())) {
|
if ("order".equals(order.getOrderType())) {
|
||||||
BuyOrderEntity orderEntity = buyOrderService.getBaseMapper().selectOne(new QueryWrapper<BuyOrderEntity>().eq("order_sn", wechatEntity.getOrderSn()));
|
BuyOrderEntity orderEntity = buyOrderService.getBaseMapper().selectOne(new QueryWrapper<BuyOrderEntity>().eq("order_sn", wechatEntity.getOrderSn()));
|
||||||
BigDecimal realMoney = orderEntity.getRealMoney();
|
BigDecimal realMoney = orderEntity.getRealMoney();
|
||||||
|
System.out.println("=========== 获取到 orderSn==================" + order.getOrderSn());
|
||||||
//更新 订单 记录
|
// 查询订单的所有 book_id
|
||||||
// 1. 根据订单 ID 查询订单详情
|
List<Integer> orderBookIdList = shopProudictBookService.getOrderBookId(order.getOrderSn());
|
||||||
// 2. 由订单详情获取商品信息
|
System.out.println("=========== 获取到 orderBookIdList==========" + orderBookIdList);
|
||||||
// 3. 查询商品信息得到 book_id
|
// 去重
|
||||||
// 4. 查询用户的所有 book_id
|
Set<Integer> set = new HashSet<>(orderBookIdList);
|
||||||
// 5. 取差集
|
orderBookIdList.clear();
|
||||||
/*
|
orderBookIdList.addAll(set);
|
||||||
list1.removeAll(list2)
|
// 查询用户的所有 book_id
|
||||||
*/
|
System.out.println("==============去重后orderBookIdList=========" + orderBookIdList);
|
||||||
// 6. 为用户添加书籍
|
List<Integer> userBookIdList = userEbookBuyService.getUserBookId(order.getUserId());
|
||||||
|
System.out.println("==============userBookIdList===============" + userBookIdList);
|
||||||
|
// 取差集
|
||||||
|
orderBookIdList.removeAll(userBookIdList);
|
||||||
|
System.out.println("============== 差集========================" + orderBookIdList);
|
||||||
|
// 为用户添加书籍
|
||||||
|
List<UserEbookBuyEntity> userEbookBuyEntities = new ArrayList<>();
|
||||||
|
for (Integer bookId : orderBookIdList) {
|
||||||
|
UserEbookBuyEntity entity = new UserEbookBuyEntity();
|
||||||
|
entity.setUserId(order.getUserId());
|
||||||
|
entity.setBookId(bookId);
|
||||||
|
userEbookBuyEntities.add(entity);
|
||||||
|
}
|
||||||
|
System.out.println("============userEbookBuyEntities===========" + userEbookBuyEntities);
|
||||||
|
boolean b = userEbookBuyService.saveBatch(userEbookBuyEntities);
|
||||||
|
System.out.println("============result========================" + b);
|
||||||
if (wechatEntity.getTotalAmount().compareTo(realMoney) == 0) {
|
if (wechatEntity.getTotalAmount().compareTo(realMoney) == 0) {
|
||||||
buyOrderService.updateOrderStatus(Integer.valueOf(order.getUserId()),order.getOrderSn(),"0");
|
buyOrderService.updateOrderStatus(order.getUserId(), order.getOrderSn(), "0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ("point".equals(order.getOrderType())) {
|
if ("point".equals(order.getOrderType())) {
|
||||||
@@ -286,8 +290,8 @@ public class WeChatPayController {
|
|||||||
Integer buyorder = buy_order_id.getBuyOrderId();
|
Integer buyorder = buy_order_id.getBuyOrderId();
|
||||||
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(buyorder);
|
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(buyorder);
|
||||||
String realMoney = bookBuyConfigEntity.getRealMoney();
|
String realMoney = bookBuyConfigEntity.getRealMoney();
|
||||||
Integer money = Integer.valueOf(realMoney);
|
int money = Integer.parseInt(realMoney);
|
||||||
userService.rechargeHSPoint(Integer.valueOf(order.getUserId()),money);
|
userService.rechargeHSPoint(order.getUserId(), money);
|
||||||
TransactionDetailsEntity transactionDetailsEntity = new TransactionDetailsEntity();
|
TransactionDetailsEntity transactionDetailsEntity = new TransactionDetailsEntity();
|
||||||
transactionDetailsEntity.setUserId(order.getUserId());
|
transactionDetailsEntity.setUserId(order.getUserId());
|
||||||
transactionDetailsEntity.setChangeAmount(new BigDecimal(money));
|
transactionDetailsEntity.setChangeAmount(new BigDecimal(money));
|
||||||
@@ -295,7 +299,7 @@ public class WeChatPayController {
|
|||||||
transactionDetailsEntity.setRelationId(buy_order_id.getId().intValue());
|
transactionDetailsEntity.setRelationId(buy_order_id.getId().intValue());
|
||||||
transactionDetailsEntity.setRemark("充值");
|
transactionDetailsEntity.setRemark("充值");
|
||||||
|
|
||||||
MyUserEntity user = userService.getById(Integer.valueOf(order.getUserId()));
|
MyUserEntity user = userService.getById(order.getUserId());
|
||||||
BigDecimal peanutCoin = user.getPeanutCoin();
|
BigDecimal peanutCoin = user.getPeanutCoin();
|
||||||
transactionDetailsEntity.setUserBalance(peanutCoin);
|
transactionDetailsEntity.setUserBalance(peanutCoin);
|
||||||
transactionDetailsEntity.setUserName(user.getNickname());
|
transactionDetailsEntity.setUserName(user.getNickname());
|
||||||
@@ -303,7 +307,7 @@ public class WeChatPayController {
|
|||||||
transactionDetailsService.save(transactionDetailsEntity);
|
transactionDetailsService.save(transactionDetailsEntity);
|
||||||
// 插入 花生币 充值记录
|
// 插入 花生币 充值记录
|
||||||
PayPaymentOrderEntity payPaymentOrderEntity = new PayPaymentOrderEntity();
|
PayPaymentOrderEntity payPaymentOrderEntity = new PayPaymentOrderEntity();
|
||||||
payPaymentOrderEntity.setUserId(Integer.valueOf(order.getUserId()));
|
payPaymentOrderEntity.setUserId(order.getUserId());
|
||||||
payPaymentOrderEntity.setOrderId(String.valueOf(buy_order_id.getId()));
|
payPaymentOrderEntity.setOrderId(String.valueOf(buy_order_id.getId()));
|
||||||
payPaymentOrderEntity.setRealAmount(new BigDecimal(bookBuyConfigEntity.getRealMoney()));
|
payPaymentOrderEntity.setRealAmount(new BigDecimal(bookBuyConfigEntity.getRealMoney()));
|
||||||
payPaymentOrderEntity.setRechargeAmount(new BigDecimal(bookBuyConfigEntity.getMoney()));
|
payPaymentOrderEntity.setRechargeAmount(new BigDecimal(bookBuyConfigEntity.getMoney()));
|
||||||
@@ -313,44 +317,32 @@ public class WeChatPayController {
|
|||||||
payPaymentOrderEntity.setUserName(user.getNickname());
|
payPaymentOrderEntity.setUserName(user.getNickname());
|
||||||
payPaymentOrderEntity.setTel(user.getTel());
|
payPaymentOrderEntity.setTel(user.getTel());
|
||||||
payPaymentOrderService.save(payPaymentOrderEntity);
|
payPaymentOrderService.save(payPaymentOrderEntity);
|
||||||
buyOrderService.updateOrderStatus(Integer.valueOf(order.getUserId()),order.getOrderSn(),"2");
|
buyOrderService.updateOrderStatus(order.getUserId(), order.getOrderSn(), "2");
|
||||||
}
|
}
|
||||||
|
|
||||||
} finally {
|
|
||||||
// 要主动释放锁
|
|
||||||
lock.unlock();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 成功应答
|
// 成功应答
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private Map<String, Object> getNotifyBody(HttpServletRequest request) {
|
private Map<String, Object> getNotifyBody(HttpServletRequest request) {
|
||||||
// 处理通知参数
|
// 处理通知参数
|
||||||
String body = HttpUtils.readData(request);
|
String body = HttpUtils.readData(request);
|
||||||
log.info("zhifu回调参数:{}",body);
|
log.info("支付回调参数:{}", body);
|
||||||
|
|
||||||
// 转换为Map
|
// 转换为Map
|
||||||
Map<String, Object> bodyMap = JSONObject.parseObject(body, new TypeReference<Map<String, Object>>(){});
|
Map<String, Object> bodyMap = JSONObject.parseObject(body, new TypeReference<Map<String, Object>>() {
|
||||||
|
});
|
||||||
// 微信的通知ID(通知的唯一ID)
|
// 微信的通知ID(通知的唯一ID)
|
||||||
String notifyId = bodyMap.get("id").toString();
|
String notifyId = bodyMap.get("id").toString();
|
||||||
|
|
||||||
// 验证签名信息
|
// 验证签名信息
|
||||||
try {
|
try {
|
||||||
WechatPayValidator wechatPayValidator
|
WechatPayValidator wechatPayValidator = new WechatPayValidator(wechatPayConfig.getVerifier(), notifyId, body);
|
||||||
= new WechatPayValidator(wechatPayConfig.getVerifier(), notifyId, body);
|
|
||||||
if (!wechatPayValidator.validate(request)) {
|
if (!wechatPayValidator.validate(request)) {
|
||||||
|
|
||||||
log.error("通知验签失败");
|
log.error("通知验签失败");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
log.info("通知验签成功");
|
log.info("通知验签成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
}
|
}
|
||||||
return bodyMap;
|
return bodyMap;
|
||||||
}
|
}
|
||||||
@@ -370,7 +362,6 @@ public class WeChatPayController {
|
|||||||
paramMap.put("description", "微信充值");
|
paramMap.put("description", "微信充值");
|
||||||
// 订单编号
|
// 订单编号
|
||||||
paramMap.put("out_trade_no", order.getOrderSn());
|
paramMap.put("out_trade_no", order.getOrderSn());
|
||||||
// paramMap.put("attach",""); //自定义数据 支付完成后才能显示 在查询API和支付通知中原样返回,可作为自定义参数使用
|
|
||||||
paramMap.put("notify_url", wechatPayConfig.getNotifyUrl());
|
paramMap.put("notify_url", wechatPayConfig.getNotifyUrl());
|
||||||
BigDecimal realsmoney = dto.getTotalAmount();
|
BigDecimal realsmoney = dto.getTotalAmount();
|
||||||
BigDecimal hand = new BigDecimal("100");
|
BigDecimal hand = new BigDecimal("100");
|
||||||
@@ -378,12 +369,7 @@ public class WeChatPayController {
|
|||||||
Map<String, Object> amountMap = new HashMap<>();
|
Map<String, Object> amountMap = new HashMap<>();
|
||||||
amountMap.put("total", realsmoney);
|
amountMap.put("total", realsmoney);
|
||||||
amountMap.put("currency", "CNY");
|
amountMap.put("currency", "CNY");
|
||||||
|
|
||||||
|
|
||||||
paramMap.put("amount", amountMap);
|
paramMap.put("amount", amountMap);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(paramMap));
|
JSONObject json = JSONObject.parseObject(JSON.toJSONString(paramMap));
|
||||||
log.info("请求参数" + paramMap);
|
log.info("请求参数" + paramMap);
|
||||||
com.alibaba.fastjson.JSONObject jsonObject1 = wxPayUtil.doPostWexinV3("https://api.mch.weixin.qq.com/v3/pay/transactions/app", json.toJSONString());
|
com.alibaba.fastjson.JSONObject jsonObject1 = wxPayUtil.doPostWexinV3("https://api.mch.weixin.qq.com/v3/pay/transactions/app", json.toJSONString());
|
||||||
@@ -402,22 +388,20 @@ public class WeChatPayController {
|
|||||||
// 向微信支付平台发送请求,处理响应结果,并将订单信息保存到数据库中。
|
// 向微信支付平台发送请求,处理响应结果,并将订单信息保存到数据库中。
|
||||||
String bodyAsString = EntityUtils.toString(response.getEntity());//响应体
|
String bodyAsString = EntityUtils.toString(response.getEntity());//响应体
|
||||||
// 时间戳
|
// 时间戳
|
||||||
Long timestamp = System.currentTimeMillis()/1000;
|
long timestamp = System.currentTimeMillis() / 1000;
|
||||||
// 随机串
|
// 随机串
|
||||||
String nonceStr = UUID.randomUUID().toString().replace("-", "");
|
String nonceStr = UUID.randomUUID().toString().replace("-", "");
|
||||||
|
|
||||||
String sign = wxPayUtil.getSign(WxPayUtil.appId, timestamp, nonceStr, prepayid);
|
String sign = wxPayUtil.getSign(WxPayUtil.appId, timestamp, nonceStr, prepayid);
|
||||||
log.info("签名:" + sign);
|
log.info("签名:" + sign);
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
Map Map = new HashMap();
|
map.put("prepayid", prepayid);
|
||||||
Map.put("prepayid",prepayid);
|
map.put("timestamp", timestamp + "");
|
||||||
Map.put("timestamp",timestamp+"");
|
map.put("noncestr", nonceStr);
|
||||||
Map.put("noncestr",nonceStr);
|
map.put("sign", sign);
|
||||||
Map.put("sign",sign);
|
map.put("appid", appId);
|
||||||
Map.put("appid",appId);
|
map.put("package", "Sign=WXPay");
|
||||||
Map.put("package","Sign=WXPay");
|
map.put("extData", "sign");
|
||||||
Map.put("extData","sign");
|
map.put("partnerid", mchId);
|
||||||
Map.put("partnerid",mchId);
|
|
||||||
try {
|
try {
|
||||||
int statusCode = response.getStatusLine().getStatusCode(); //响应状态码
|
int statusCode = response.getStatusLine().getStatusCode(); //响应状态码
|
||||||
if (statusCode == 200) { //处理成功
|
if (statusCode == 200) { //处理成功
|
||||||
@@ -433,9 +417,7 @@ public class WeChatPayController {
|
|||||||
wechat.setPayType(order.getOrderType()); //交易类型
|
wechat.setPayType(order.getOrderType()); //交易类型
|
||||||
wechat.setOrderId(order.getOrderSn()); //订单号
|
wechat.setOrderId(order.getOrderSn()); //订单号
|
||||||
wechat.setBuyOrderId(dto.getBuyOrderId()); //购买配置id
|
wechat.setBuyOrderId(dto.getBuyOrderId()); //购买配置id
|
||||||
// wechat.setEndtime(after);
|
|
||||||
this.payWechatOrderService.save(wechat); //微信订单表拿到数据保存数据库
|
this.payWechatOrderService.save(wechat); //微信订单表拿到数据保存数据库
|
||||||
|
|
||||||
} else if (statusCode == 204) { //处理成功,无返回Body
|
} else if (statusCode == 204) { //处理成功,无返回Body
|
||||||
System.out.println("成功");
|
System.out.println("成功");
|
||||||
} else {
|
} else {
|
||||||
@@ -446,9 +428,6 @@ public class WeChatPayController {
|
|||||||
response.close();
|
response.close();
|
||||||
}
|
}
|
||||||
// 返回url和订单号
|
// 返回url和订单号
|
||||||
return R.ok().put("paramMap" ,paramMap).put("Map",Map);
|
return R.ok().put("paramMap", paramMap).put("Map", map);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ import java.util.Base64;
|
|||||||
|
|
||||||
public static final String apiV3Key = "4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF"; // apiV3秘钥
|
public static final String apiV3Key = "4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF"; // apiV3秘钥
|
||||||
//商户私钥路径
|
//商户私钥路径
|
||||||
public static final String privateKeyUrl = "/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem";
|
// public static final String privateKeyUrl = "/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem";
|
||||||
// public static final String privateKeyUrl = "C:/Users/Administrator/IdeaProjects/peanut_book/src/main/resources/cent/apiclient_key.pem";
|
public static final String privateKeyUrl = "C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/apiclient_key.pem";
|
||||||
|
|
||||||
//平台证书路径
|
//平台证书路径
|
||||||
public static final String wechatPayCertificateUrl = "/usr/local/hs/peanut_book/target/classes/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem";
|
// public static final String wechatPayCertificateUrl = "/usr/local/hs/peanut_book/target/classes/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem";
|
||||||
// public static final String wechatPayCertificateUrl = "C:/Users/Administrator/IdeaProjects/peanut_book/src/main/resources/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem";
|
public static final String wechatPayCertificateUrl = "C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem";
|
||||||
//第一步申请完证书后,在API证书哪里点击管理证书就能看到
|
//第一步申请完证书后,在API证书哪里点击管理证书就能看到
|
||||||
public static final String mchSerialNo = "679AECB2F7AC4183033F713828892BA640E4EEE3"; // 商户证书序列号
|
public static final String mchSerialNo = "679AECB2F7AC4183033F713828892BA640E4EEE3"; // 商户证书序列号
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ connection-timeout: 6000000ms
|
|||||||
spring:
|
spring:
|
||||||
# 环境 dev|test|prod
|
# 环境 dev|test|prod
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: prod
|
||||||
# jackson时间格式化
|
# jackson时间格式化
|
||||||
jackson:
|
jackson:
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
|
|||||||
@@ -13,18 +13,13 @@
|
|||||||
<result property="bookdIds" column="book_ids"/>
|
<result property="bookdIds" column="book_ids"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!--
|
<select id="getOrderBookId" parameterType="string" resultType="int">
|
||||||
SELECT
|
SELECT spb.book_id
|
||||||
spb.*
|
FROM shop_proudict_book spb
|
||||||
FROM
|
|
||||||
shop_proudict_book spb
|
|
||||||
LEFT JOIN buy_order_detail bod ON spb.proudict_id = bod.product_id
|
LEFT JOIN buy_order_detail bod ON spb.proudict_id = bod.product_id
|
||||||
LEFT JOIN buy_order bo ON bo.order_id = bod.order_id
|
LEFT JOIN buy_order bo ON bo.order_id = bod.order_id
|
||||||
WHERE
|
WHERE bo.order_sn = #{orderSn}
|
||||||
bo.order_sn = '202305291720149121663113008012001282'
|
</select>
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -16,9 +16,9 @@
|
|||||||
<result property="author" column="author"/>
|
<result property="author" column="author"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!--
|
<select id="getUserBookId" parameterType="int" resultType="int">
|
||||||
select book_id from user_ebook_buy where user_id = '10169'
|
SELECT book_id
|
||||||
-->
|
FROM user_ebook_buy
|
||||||
|
WHERE user_id = #{userId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -1,50 +1,48 @@
|
|||||||
wxpay:
|
wxpay:
|
||||||
#应用编号
|
# ????
|
||||||
wxpay.appId: wx47134a8f15083734
|
wxpay.appId: wx47134a8f15083734
|
||||||
#商户号
|
# ???
|
||||||
wxpay.mchId: 1612860909
|
wxpay.mchId: 1612860909
|
||||||
# APIv3密钥
|
# API v3 ??
|
||||||
wxpay.apiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
wxpay.apiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
||||||
# 微信支付V3-url前缀
|
# v3 - url
|
||||||
wxpay.baseUrl: https://api.mch.weixin.qq.com/v3
|
wxpay.baseUrl: https://api.mch.weixin.qq.com/v3
|
||||||
#po9k1ezoyexk.ngrok.xiaomiqiu123.top 内网穿透地址 测试ok 正式环境下切换服务器地址
|
#po9k1ezoyexk.ngrok.xiaomiqiu123.top # ????????
|
||||||
#wxpay.notifyUrl: http://101.201.146.165:9100
|
#wxpay.notifyUrl: http://101.201.146.165:9100
|
||||||
|
|
||||||
wxpay.notifyUrl: http://59.110.212.44:9100/pb/pay/payNotify
|
wxpay.notifyUrl: http://59.110.212.44:9100/pb/pay/payNotify
|
||||||
|
|
||||||
# 退款通知回调, pjm6m9.natappfree.cc 为内网穿透地址
|
# ??????
|
||||||
wxpay.refundNotifyUrl: http://pjm6m9.natappfree.cc/pay/refundNotify
|
wxpay.refundNotifyUrl: http://pjm6m9.natappfree.cc/pay/refundNotify
|
||||||
# 密钥路径,resources下 /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
# ???? /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||||
|
|
||||||
wxpay.keyPemPath:C:/Users/Administrator/IdeaProjects/peanut_book/src/main/resources/cent/apiclient_key.pem
|
wxpay.keyPemPath:C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
||||||
#wxpay.keyPemPath:D:/hs/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
#wxpay.keyPemPath:D:/hs/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
||||||
#商户证书序列号
|
#???????
|
||||||
wxpay.serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
wxpay.serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
||||||
#微信服务器地址
|
#???????
|
||||||
wxpay.domain: https://api.mch.weixin.qq.com
|
wxpay.domain: https://api.mch.weixin.qq.com
|
||||||
|
|
||||||
|
|
||||||
#wxpay:
|
#wxpay:
|
||||||
##应用编号
|
##????
|
||||||
#wxpay.appId: wx47134a8f15083734
|
#wxpay.appId: wx47134a8f15083734
|
||||||
##商户号
|
##???
|
||||||
#wxpay.mchId: 1612860909
|
#wxpay.mchId: 1612860909
|
||||||
## APIv3密钥
|
## APIv3??
|
||||||
#wxpay.apiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
#wxpay.apiV3Key: 4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
||||||
## 微信支付V3-url前缀
|
## ????V3-url??
|
||||||
#wxpay.baseUrl: https://api.mch.weixin.qq.com/v3
|
#wxpay.baseUrl: https://api.mch.weixin.qq.com/v3
|
||||||
##po9k1ezoyexk.ngrok.xiaomiqiu123.top 内网穿透地址 测试ok 正式环境下切换服务器地址
|
##po9k1ezoyexk.ngrok.xiaomiqiu123.top ?????? ??ok ????????????
|
||||||
#
|
#
|
||||||
##wxpay.notifyUrl: http://101.201.146.165:9100
|
##wxpay.notifyUrl: http://101.201.146.165:9100
|
||||||
#
|
#
|
||||||
#wxpay.notifyUrl: http://59.110.212.44:9100/pb/pay/payNotify
|
#wxpay.notifyUrl: http://59.110.212.44:9100/pb/pay/payNotify
|
||||||
#
|
#
|
||||||
## 退款通知回调, pjm6m9.natappfree.cc 为内网穿透地址
|
## ??????, pjm6m9.natappfree.cc ???????
|
||||||
#wxpay.refundNotifyUrl: http://pjm6m9.natappfree.cc/pay/refundNotify
|
#wxpay.refundNotifyUrl: http://pjm6m9.natappfree.cc/pay/refundNotify
|
||||||
## 密钥路径,resources下 /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
## ????,resources? /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||||
#
|
#
|
||||||
#wxpay.keyPemPath:/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
#wxpay.keyPemPath:/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||||
##商户证书序列号
|
##???????
|
||||||
#wxpay.serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
#wxpay.serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
||||||
##微信服务器地址
|
##???????
|
||||||
#wxpay.domain: https://api.mch.weixin.qq.com
|
#wxpay.domain: https://api.mch.weixin.qq.com
|
||||||
Reference in New Issue
Block a user