Skip to content

Commit

Permalink
Merge pull request #3031 from JeffreySu/Developer
Browse files Browse the repository at this point in the history
Developer
  • Loading branch information
JeffreySu authored Jun 22, 2024
2 parents d4927df + 87db6cf commit 08a36a3
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ and limitations under the License.
创建标识:Senparc - 20220629
修改标识:Guili95 - 20240623
修改描述:v1.4.0 添加:微信支付-发起商家转账入参添加转账场景ID、通知地址;返回结果添加批次状态
----------------------------------------------------------------*/

using System;
Expand Down Expand Up @@ -75,6 +78,16 @@ public class BatchesRequestData
/// <para>发起批量转账的明细列表,最多三千笔</para>
/// </summary>
public Transfer_Detail_List[] transfer_detail_list { get; set; }
/// <summary>
/// 转账场景ID
/// <para>该批次转账使用的转账场景,如不填写则使用商家的默认场景,如无默认场景可为空,可前往“商家转账到零钱-前往功能”中申请。示例值:1001-现金营销</para>
/// </summary>
public string transfer_scene_id { get; set; }
/// <summary>
/// 通知地址
/// <para>异步接收微信支付结果通知的回调地址,通知url必须为公网可访问的url,必须为https,不能携带参数</para>
/// </summary>
public string notify_url { get; set; }
}

public class Transfer_Detail_List
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ and limitations under the License.
创建标识:Senparc - 20220629
修改标识:Guili95 - 20240623
修改描述:v1.4.0 添加:微信支付-发起商家转账入参添加转账场景ID、通知地址;返回结果添加批次状态
----------------------------------------------------------------*/

using Senparc.Weixin.TenPayV3.Apis.Entities;
Expand Down Expand Up @@ -57,6 +60,14 @@ public class BatchesReturnJson : ReturnJsonBase
/// <para>示例值:2015-05-20T13:29:35.120+08:00</para>
/// </summary>
public DateTime create_time { get; set; }
/// <summary>
/// 批次状态
/// <para>ACCEPTED:已受理。批次已受理成功,若发起批量转账的30分钟后,转账批次单仍处于该状态,可能原因是商户账户余额不足等。商户可查询账户资金流水,若该笔转账批次单的扣款已经发生,则表示批次已经进入转账中,请再次查单确认</para>
/// <para>PROCESSING:转账中。已开始处理批次内的转账明细单</para>
/// <para>FINISHED:已完成。批次内的所有转账明细单都已处理完成</para>
/// <para>CLOSED:已关闭。可查询具体的批次关闭原因确认</para>
/// </summary>
public string batch_status { get; set; }
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>1.3.2</Version>
<Version>1.4.0</Version>
<AssemblyName>Senparc.Weixin.TenPayV3</AssemblyName>
<RootNamespace>Senparc.Weixin.TenPayV3</RootNamespace>
<LangVersion>10.0</LangVersion>
Expand Down Expand Up @@ -54,7 +54,8 @@
3、TenPayV3分账 字段内部加密 PR#2909
v1.1.0 TenPaySignHelper.GetJsApiUiPackage() 方法添加 senparcWeixinSettingForTenpayV3 参数
v1.2.1.1 解决微信支付分、完成订单参数可为空的问题 Issue #2989
</PackageReleaseNotes>
v1.4.0 添加:微信支付-发起商家转账入参添加转账场景ID、通知地址;返回结果添加批次状态 / PR #3030
</PackageReleaseNotes>
<RepositoryUrl>https://github.com/JeffreySu/WeiXinMPSDK</RepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ and limitations under the License.
修改标识:Senparc - 20230905
修改描述:v4.15.0 完善“第三方服务商小程序备案”接口
修改标识:Guili95 - 20240623
修改描述:v3.19.0 添加小程序发货信息管理服务-查询小程序是否已完成交易结算管理确认接口
----------------------------------------------------------------*/


Expand Down Expand Up @@ -205,6 +208,27 @@ public static IsTradeManagedJsonResult IsTradeManaged(string accessTokenOrAppId,

}, accessTokenOrAppId);
}

/// <summary>
/// 查询小程序是否已完成交易结算管理确认
/// </summary>
/// <param name="accessTokenOrAppId"></param>
/// <param name="appid"></param>
/// <param name="timeOut"></param>
/// <returns></returns>
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<IsTradeManagementConfirmationCompletedJsonResult>(accessToken, urlFormat, postBody, timeOut: timeOut);

}, accessTokenOrAppId);
}
#endregion

#region 异步方法
Expand Down Expand Up @@ -359,6 +383,27 @@ public static async Task<IsTradeManagedJsonResult> IsTradeManagedAsync(string ac

}, accessTokenOrAppId).ConfigureAwait(false);
}

/// <summary>
/// 【异步方法】查询小程序是否已完成交易结算管理确认
/// </summary>
/// <param name="accessTokenOrAppId"></param>
/// <param name="appid"></param>
/// <param name="timeOut"></param>
/// <returns></returns>
public static async Task<IsTradeManagementConfirmationCompletedJsonResult> 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<IsTradeManagementConfirmationCompletedJsonResult>(accessToken, urlFormat, postBody, timeOut: timeOut);

}, accessTokenOrAppId).ConfigureAwait(false);
}
#endregion
}
}
Original file line number Diff line number Diff line change
@@ -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
{
/// <summary>
/// 查询小程序是否已完成交易结算管理确认
/// </summary>
public class IsTradeManagementConfirmationCompletedJsonResult : WxJsonResult
{
/// <summary>
/// 是否已完成交易结算管理确认
/// </summary>
public bool completed { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;netstandard2.0;netstandard2.1</TargetFrameworks>
<Version>3.18.2</Version>
<Version>3.19.0</Version>
<LangVersion>9.0</LangVersion>
<AssemblyName>Senparc.Weixin.WxOpen</AssemblyName>
<RootNamespace>Senparc.Weixin.WxOpen</RootNamespace>
Expand Down Expand Up @@ -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
</PackageReleaseNotes>
v3.19.0 添加小程序发货信息管理服务-查询小程序是否已完成交易结算管理确认接口 / PR #3030
</PackageReleaseNotes>
<RepositoryUrl>https://github.com/JeffreySu/WeiXinMPSDK</RepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down

0 comments on commit 08a36a3

Please sign in to comment.