wangqifan 3 лет назад
Родитель
Сommit
e942c07e2a
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      src/main/java/com/izouma/nineth/service/SandPayService.java

+ 5 - 5
src/main/java/com/izouma/nineth/service/SandPayService.java

@@ -102,7 +102,7 @@ public class SandPayService {
         try {
             log.info("请求报文:\n{}", JSONObject.toJSONString(reqJson, true));
             result = HttpClient.doPost(reqAddr, reqMap, 30000, 30000);
-            result = URLDecoder.decode(result, StandardCharsets.UTF_8);
+//            result = URLDecoder.decode(result, StandardCharsets.UTF_8);
         } catch (IOException e) {
             log.error(e.getMessage());
             return null;
@@ -204,7 +204,7 @@ public class SandPayService {
         //body.put("limitPay", "5");                                  //限定支付方式 送1-限定不能使用贷记卡	送4-限定不能使用花呗	送5-限定不能使用贷记卡+花呗
         body.put("subject", subject);                                 //订单标题
         body.put("body", desc);                                       //订单描述
-        body.put("txnTimeOut", timeout);
+//        body.put("txnTimeOut", timeout);
         body.put("currencyCode", 156);   //订单超时时间
         body.put("notifyUrl", sandPayProperties.getNotifyUrl());
         body.put("frontUrl", frontUrl);
@@ -286,9 +286,9 @@ public class SandPayService {
     @Cacheable(value = "sandPayQuick", key = "#orderId")
     public String payOrderQuick(Long orderId) {
         Order order = orderRepo.findById(orderId).orElseThrow(new BusinessException("订单不存在"));
-        if (order.getStatus() != OrderStatus.NOT_PAID) {
-            throw new BusinessException("订单状态错误");
-        }
+//        if (order.getStatus() != OrderStatus.NOT_PAID) {
+//            throw new BusinessException("订单状态错误");
+//        }
         JSONObject extend = new JSONObject();
         extend.put("type", "order");
         extend.put("id", orderId);