diff --git a/suimangCApi/src/main/java/com/iformall/controller/ProductOrderController.java b/suimangCApi/src/main/java/com/iformall/controller/ProductOrderController.java index 7373ecf..030f2b1 100644 --- a/suimangCApi/src/main/java/com/iformall/controller/ProductOrderController.java +++ b/suimangCApi/src/main/java/com/iformall/controller/ProductOrderController.java @@ -220,8 +220,9 @@ public class ProductOrderController extends BaseController { ResultData resultData = productOrderPayService.handleProductOrderByQuery(appinfo,payAccount,orderPay,payAdapterService); } + ProductOrder order = productOrderService.getById(orderId); - return new ResultData(orderPay); + return new ResultData(order); } diff --git a/suimangService/src/main/java/com/iformall/service/impl/ProductOrderPayServiceImpl.java b/suimangService/src/main/java/com/iformall/service/impl/ProductOrderPayServiceImpl.java index df5ebd8..1a1c00f 100644 --- a/suimangService/src/main/java/com/iformall/service/impl/ProductOrderPayServiceImpl.java +++ b/suimangService/src/main/java/com/iformall/service/impl/ProductOrderPayServiceImpl.java @@ -168,7 +168,7 @@ public class ProductOrderPayServiceImpl implements ProductOrderPayService { return new ResultData(ErrorCode.PAY_ORDER_ERROR.getCode(), payResult.getMsg(), payResult.getData()); } } catch (Exception e) { - e.printStackTrace(); + logger.error("创建支付单异常 ",e); return new ResultData(ErrorCode.PAY_ORDER_ERROR.getCode(),"支付订单异常"); } } @@ -204,7 +204,7 @@ public class ProductOrderPayServiceImpl implements ProductOrderPayService { return new ResultData(ErrorCode.PAY_ORDER_ERROR.getCode(),"支付单状态异常"); } } catch (Exception e) { - e.printStackTrace(); + logger.error("查询支付单异常 ",e); return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(),e.getMessage()); } return new ResultData(); diff --git a/suimangService/src/main/java/com/iformall/service/pay/service/pay/ali/page/AliPagePayAdapterService.java b/suimangService/src/main/java/com/iformall/service/pay/service/pay/ali/page/AliPagePayAdapterService.java index 11fce50..e0682d4 100644 --- a/suimangService/src/main/java/com/iformall/service/pay/service/pay/ali/page/AliPagePayAdapterService.java +++ b/suimangService/src/main/java/com/iformall/service/pay/service/pay/ali/page/AliPagePayAdapterService.java @@ -1,5 +1,6 @@ package com.iformall.service.pay.service.pay.ali.page; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.alipay.api.AlipayApiException; import com.alipay.api.AlipayClient; @@ -62,7 +63,9 @@ public class AliPagePayAdapterService extends BaseAliPayAdapterService implement //电脑网站支付场景固定传值FAST_INSTANT_TRADE_PAY bizContent.put("product_code", "FAST_INSTANT_TRADE_PAY"); - bizContent.put("qr_pay_mode",1); + bizContent.put("qr_pay_mode",4); + bizContent.put("qrcode_width",300); + String after15 = DateUtils.date2String(DateUtils.getSecondsTimeAfter(15 * 60, new Date())); @@ -71,13 +74,15 @@ public class AliPagePayAdapterService extends BaseAliPayAdapterService implement request.setBizContent(bizContent.toString()); try{ AlipayTradePagePayResponse response = alipayClient.pageExecute(request); + log.info("创建支付返回{}"+ JSON.toJSONString(response)); PayAdapterResult par = new PayAdapterResult(); if(response.isSuccess()){ - if("10000".equals(response.getCode())){ - par.setSuccess(true); - par.setTransactionId(response.getTradeNo()); - par.setData(response); - } + + par.setSuccess(true); + par.setTransactionId(response.getTradeNo()); + par.setData(response); + return par; + } par.setSuccess(false); par.setMsg(response.getMsg());