diff --git a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Transfer/Entities/RequestData/BatchesRequestData.cs b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Transfer/Entities/RequestData/BatchesRequestData.cs index 4512031c68..b47c0883ab 100644 --- a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Transfer/Entities/RequestData/BatchesRequestData.cs +++ b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Transfer/Entities/RequestData/BatchesRequestData.cs @@ -27,6 +27,9 @@ and limitations under the License. 创建标识:Senparc - 20220629 + 修改标识:Guili95 - 20240623 + 修改描述:v1.4.0 添加:微信支付-发起商家转账入参添加转账场景ID、通知地址;返回结果添加批次状态 + ----------------------------------------------------------------*/ using System; @@ -75,6 +78,16 @@ public class BatchesRequestData /// 发起批量转账的明细列表,最多三千笔 /// public Transfer_Detail_List[] transfer_detail_list { get; set; } + /// + /// 转账场景ID + /// 该批次转账使用的转账场景,如不填写则使用商家的默认场景,如无默认场景可为空,可前往“商家转账到零钱-前往功能”中申请。示例值:1001-现金营销 + /// + public string transfer_scene_id { get; set; } + /// + /// 通知地址 + /// 异步接收微信支付结果通知的回调地址,通知url必须为公网可访问的url,必须为https,不能携带参数 + /// + public string notify_url { get; set; } } public class Transfer_Detail_List diff --git a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Transfer/Entities/ReturnJson/BatchesReturnJson.cs b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Transfer/Entities/ReturnJson/BatchesReturnJson.cs index 0468b4f45a..d582b9b8be 100644 --- a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Transfer/Entities/ReturnJson/BatchesReturnJson.cs +++ b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Apis/Transfer/Entities/ReturnJson/BatchesReturnJson.cs @@ -27,6 +27,9 @@ and limitations under the License. 创建标识:Senparc - 20220629 + 修改标识:Guili95 - 20240623 + 修改描述:v1.4.0 添加:微信支付-发起商家转账入参添加转账场景ID、通知地址;返回结果添加批次状态 + ----------------------------------------------------------------*/ using Senparc.Weixin.TenPayV3.Apis.Entities; @@ -57,6 +60,14 @@ public class BatchesReturnJson : ReturnJsonBase /// 示例值:2015-05-20T13:29:35.120+08:00 /// public DateTime create_time { get; set; } + /// + /// 批次状态 + /// ACCEPTED:已受理。批次已受理成功,若发起批量转账的30分钟后,转账批次单仍处于该状态,可能原因是商户账户余额不足等。商户可查询账户资金流水,若该笔转账批次单的扣款已经发生,则表示批次已经进入转账中,请再次查单确认 + /// PROCESSING:转账中。已开始处理批次内的转账明细单 + /// FINISHED:已完成。批次内的所有转账明细单都已处理完成 + /// CLOSED:已关闭。可查询具体的批次关闭原因确认 + /// + public string batch_status { get; set; } } } diff --git a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Senparc.Weixin.TenPayV3.net8.csproj b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Senparc.Weixin.TenPayV3.net8.csproj index 02b658f4d2..6d83aed35d 100644 --- a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Senparc.Weixin.TenPayV3.net8.csproj +++ b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Senparc.Weixin.TenPayV3.net8.csproj @@ -1,7 +1,7 @@ netstandard2.1 - 1.3.2 + 1.4.0 Senparc.Weixin.TenPayV3 Senparc.Weixin.TenPayV3 10.0 @@ -54,7 +54,8 @@ 3、TenPayV3分账 字段内部加密 PR#2909 v1.1.0 TenPaySignHelper.GetJsApiUiPackage() 方法添加 senparcWeixinSettingForTenpayV3 参数 v1.2.1.1 解决微信支付分、完成订单参数可为空的问题 Issue #2989 - + v1.4.0 添加:微信支付-发起商家转账入参添加转账场景ID、通知地址;返回结果添加批次状态 / PR #3030 + https://github.com/JeffreySu/WeiXinMPSDK diff --git a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Sec/Order.cs b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Sec/Order.cs index 1f06c18253..af8e62f113 100644 --- a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Sec/Order.cs +++ b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Sec/Order.cs @@ -29,6 +29,9 @@ and limitations under the License. 修改标识:Senparc - 20230905 修改描述:v4.15.0 完善“第三方服务商小程序备案”接口 + 修改标识:Guili95 - 20240623 + 修改描述:v3.19.0 添加小程序发货信息管理服务-查询小程序是否已完成交易结算管理确认接口 + ----------------------------------------------------------------*/ @@ -205,6 +208,27 @@ public static IsTradeManagedJsonResult IsTradeManaged(string accessTokenOrAppId, }, accessTokenOrAppId); } + + /// + /// 查询小程序是否已完成交易结算管理确认 + /// + /// + /// + /// + /// + public static IsTradeManagementConfirmationCompletedJsonResult IsTradeManagementConfirmationCompleted(string accessTokenOrAppId, string appid, int timeOut = Config.TIME_OUT) + { + return WxOpenApiHandlerWapper.TryCommonApi(accessToken => + { + string urlFormat = Config.ApiMpHost + "/wxa/sec/order/is_trade_management_confirmation_completed?access_token={0}"; + var postBody = new + { + appid + }; + return CommonJsonSend.Send(accessToken, urlFormat, postBody, timeOut: timeOut); + + }, accessTokenOrAppId); + } #endregion #region 异步方法 @@ -359,6 +383,27 @@ public static async Task IsTradeManagedAsync(string ac }, accessTokenOrAppId).ConfigureAwait(false); } + + /// + /// 【异步方法】查询小程序是否已完成交易结算管理确认 + /// + /// + /// + /// + /// + public static async Task IsTradeManagementConfirmationCompletedAsync(string accessTokenOrAppId, string appid, int timeOut = Config.TIME_OUT) + { + return await WxOpenApiHandlerWapper.TryCommonApiAsync(async accessToken => + { + string urlFormat = Config.ApiMpHost + "/wxa/sec/order/is_trade_management_confirmation_completed?access_token={0}"; + var postBody = new + { + appid + }; + return await CommonJsonSend.SendAsync(accessToken, urlFormat, postBody, timeOut: timeOut); + + }, accessTokenOrAppId).ConfigureAwait(false); + } #endregion } } diff --git a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Sec/SecJson/JsonResult/IsTradeManagementConfirmationCompletedJsonResult.cs b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Sec/SecJson/JsonResult/IsTradeManagementConfirmationCompletedJsonResult.cs new file mode 100644 index 0000000000..fa0d91ec46 --- /dev/null +++ b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/Sec/SecJson/JsonResult/IsTradeManagementConfirmationCompletedJsonResult.cs @@ -0,0 +1,45 @@ +#region Apache License Version 2.0 +/*---------------------------------------------------------------- + +Copyright 2024 Jeffrey Su & Suzhou Senparc Network Technology Co.,Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file +except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the +License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +either express or implied. See the License for the specific language governing permissions +and limitations under the License. + +Detail: https://github.com/JeffreySu/WeiXinMPSDK/blob/master/license.md + +----------------------------------------------------------------*/ +#endregion Apache License Version 2.0 + +/*---------------------------------------------------------------- + Copyright (C) 2024 Senparc + + 文件名:IsTradeManagementConfirmationCompletedJsonResult.cs + 文件功能描述:查询小程序是否已完成交易结算管理确认 接口返回参数 + + 创建标识:Guili95 - 20240623 + +----------------------------------------------------------------*/ + +using Senparc.Weixin.Entities; + +namespace Senparc.Weixin.WxOpen.AdvancedAPIs.Sec +{ + /// + /// 查询小程序是否已完成交易结算管理确认 + /// + public class IsTradeManagementConfirmationCompletedJsonResult : WxJsonResult + { + /// + /// 是否已完成交易结算管理确认 + /// + public bool completed { get; set; } + } +} diff --git a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net8.csproj b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net8.csproj index b86b73e224..58917bf11b 100644 --- a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net8.csproj +++ b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net8.csproj @@ -1,7 +1,7 @@ net462;netstandard2.0;netstandard2.1 - 3.18.2 + 3.19.0 9.0 Senparc.Weixin.WxOpen Senparc.Weixin.WxOpen @@ -180,7 +180,8 @@ v3.17.3 添加小程序分类审核异步通知事件 / PR #2969 v3.17.5 新增小程序认证年审事件接口 / PR #2979 v3.17.6 虚拟支付增加了接口从1.0.7~1.0.10,同步完善 / PR #2987 - + v3.19.0 添加小程序发货信息管理服务-查询小程序是否已完成交易结算管理确认接口 / PR #3030 + https://github.com/JeffreySu/WeiXinMPSDK