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