From 2fed5b176458a3776be9ea39ae9bc52c461ca815 Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期六, 28 十月 2023 14:33:59 +0800
Subject: [PATCH] 10.28。1

---
 cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 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 b0aef0f..e9a7ebc 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
@@ -12,6 +12,7 @@
 import com.alipay.api.domain.RoyaltyInfo;
 import com.alipay.api.request.*;
 import com.alipay.api.response.*;
+import lombok.Synchronized;
 import org.apache.commons.collections.map.HashedMap;
 import org.bouncycastle.jce.provider.BouncyCastleProvider;
 import org.dom4j.Document;
@@ -76,6 +77,7 @@
     /**
      * 支付宝支付
      */
+
     public ResultUtil alipay(String body, String subject, String passbackParams, String outTradeNo, String amount, String notifyUrl){
 //        //构造client
 //        CertAlipayRequest certAlipayRequest = new CertAlipayRequest ();
@@ -147,6 +149,7 @@
 
 
 
+
         //分账
 //        Integer    coursePackagePayments = coursePackageClient.queryByCode(outTradeNo);
 //        Integer paymentCompetitions = competitionsClient.queryByCode(outTradeNo);
@@ -161,10 +164,9 @@
 //        String alipayProportion = operatorUser.getAlipayProportion();
 //        String alipayNum = operatorUser.getAlipayNum();
 
-        ExtendParams extendParams = new ExtendParams();
 //        extendParams.setSysServiceProviderId("YOUR_SERVICE_PROVIDER_ID");
+        ExtendParams extendParams = new ExtendParams();
         model.setExtendParams(extendParams);
-
         RoyaltyInfo royaltyInfo = new RoyaltyInfo();
 //        royaltyInfo.setRoyaltyType("transfer");
 
@@ -194,6 +196,7 @@
             Map<String, String> map = new HashMap<>();
             map.put("orderString", response.getBody());
             System.err.println("========map=========="+map);//就是orderString 可以直接给客户端请求,无需再做处理。
+            map.put("siteBooking",passbackParams);
             return ResultUtil.success(map);
         } catch (AlipayApiException e) {
             e.printStackTrace();
@@ -303,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;
         }
     }
 
@@ -421,6 +426,7 @@
                         String s1 = this.weixinSignature(map3);
                         map3.put("sign", s1);
                         System.err.println(map3);
+                        map3.put("siteBookingId",attach);
                         return ResultUtil.success(map3);
                 }
                 return null;

--
Gitblit v1.7.1