lcl 1 år sedan
förälder
incheckning
ace8279122

+ 1 - 0
AppStart/Alipay/AlipayFunction.cs

@@ -274,6 +274,7 @@ namespace MySystem
                 requestAccess_token.GrantType = "authorization_code";
                 requestAccess_token.Code = Auth_code;
                 AlipaySystemOauthTokenResponse responseAccess_token = client.Execute(requestAccess_token);
+                function.WriteLog(responseAccess_token.Body, "支付宝授权");
                 string AlipayUserId = responseAccess_token.AlipayUserId; //20881043611849171819285350010300
                 string UserId = responseAccess_token.UserId; //2088222145274001
                 result = UserId + "|" + AlipayUserId;

+ 2 - 2
Areas/Api/Controllers/v1/MainServer/ConsumerOrdersController.cs

@@ -160,7 +160,7 @@ namespace MySystem.Areas.Api.Controllers.v1
             int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
             int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
-            List<Dictionary<string, object>> query = new ConsumerOrdersService().List(new List<FieldItem>(), " and ConsumerId=" + ConsumerId, PageNum, PageSize);
+            List<Dictionary<string, object>> query = new ConsumerOrdersService().List(new List<FieldItem>(), " and ConsumerId=" + ConsumerId + " and Status>0", PageNum, PageSize);
             foreach (Dictionary<string, object> subdata in query)
             {
                 MerchantInfo merchant = MerchantInfoDbconn.Instance.Get(int.Parse(subdata["MerchantId"].ToString())) ?? new MerchantInfo();
@@ -298,7 +298,7 @@ namespace MySystem.Areas.Api.Controllers.v1
             maindb.SaveChanges();
             if (PayMode == 1)
             { 
-                string backString = new AlipayFunction(_accessor.HttpContext).CreateTrade(OrderNo, merchant.Name, PayMoney.ToString("f2"), openid, SourceHost + "/api/alipay/notice", "202203BB9929042f42af4f0395c0ad8c6b056A03");
+                string backString = new AlipayFunction(_accessor.HttpContext).CreateTrade(OrderNo, merchant.Name, PayMoney.ToString("f2"), openid, SourceHost + "/api/alipay/notice", "202306BB1b7b3dc720194a2fb188afe5e461eX03");
                 JsonData obj = JsonMapper.ToObject(backString);
                 if (obj["alipay_trade_create_response"]["code"].ToString() == "10000")
                 {