From e5ed9472ff4b5bf2f26e5beb6a77af571057b79b Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期三, 01 十一月 2023 18:58:03 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai --- cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java b/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java index 915a855..c2b8f8b 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java +++ b/cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java @@ -61,7 +61,7 @@ private String key = "";//微信商户号 - private String callbackPath = "";//支付回调网关地址 + private String callbackPath = "http://8.137.22.229:56666/other";//支付回调网关地址 private String app_cert_path = "C:/cert/alipay/user/app_cert_path.crt";//应用公钥证书路径 @@ -306,18 +306,20 @@ * @return * @throws Exception */ - public ResultUtil queryALIOrder(String out_trade_no) throws Exception{ + public AlipayTradeQueryResponse queryALIOrder(String out_trade_no) throws Exception{ AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do",aliAppid, appPrivateKey,"json","UTF-8",alipay_public_key,"RSA2"); AlipayTradeQueryRequest request = new AlipayTradeQueryRequest(); request.setBizContent("{" + " \"out_trade_no\":\"" + out_trade_no + "\"" + "}"); AlipayTradeQueryResponse response = alipayClient.execute(request); + if(response.isSuccess()){ String tradeStatus = response.getTradeStatus();//交易状态:WAIT_BUYER_PAY(交易创建,等待买家付款)、TRADE_CLOSED(未付款交易超时关闭,或支付完成后全额退款)、TRADE_SUCCESS(交易支付成功)、TRADE_FINISHED(交易结束,不可退款) - return ResultUtil.success(tradeStatus); + return response; } else { - return ResultUtil.error(response.getMsg()); +// return ResultUtil.error(response.getMsg()); + return response; } } -- Gitblit v1.7.1