Skip to content

Commit

Permalink
Merge pull request #3092 from JeffreySu/Developer
Browse files Browse the repository at this point in the history
Developer
  • Loading branch information
JeffreySu authored Nov 2, 2024
2 parents 058df39 + 096816e commit 014ddf2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ public async Task<IActionResult> RefundNotifyUrl()
try
{
var resHandler = new TenPayNotifyHandler(HttpContext);
var refundNotifyJson = await resHandler.AesGcmDecryptGetObjectAsync<RefundNotifyJson>();
var refundNotifyJson = await resHandler.DecryptGetObjectAsync<RefundNotifyJson>();

WeixinTrace.SendCustomLog("跟踪RefundNotifyUrl信息", refundNotifyJson.ToJson());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public async Task<IActionResult> PayNotifyUrl()
{
//获取微信服务器异步发送的支付通知信息
var resHandler = new TenPayNotifyHandler(HttpContext);
var orderReturnJson = await resHandler.AesGcmDecryptGetObjectAsync<OrderReturnJson>();
var orderReturnJson = await resHandler.DecryptGetObjectAsync<OrderReturnJson>();

//记录日志
Senparc.Weixin.WeixinTrace.SendCustomLog("PayNotifyUrl 接收到消息", orderReturnJson.ToJson(true));
Expand Down Expand Up @@ -552,7 +552,7 @@ public async Task<IActionResult> RefundNotifyUrl()
try
{
var resHandler = new TenPayNotifyHandler(HttpContext);
var refundNotifyJson = await resHandler.AesGcmDecryptGetObjectAsync<RefundNotifyJson>();
var refundNotifyJson = await resHandler.DecryptGetObjectAsync<RefundNotifyJson>();

WeixinTrace.SendCustomLog("跟踪RefundNotifyUrl信息", refundNotifyJson.ToJson());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public async Task&lt;IActionResult&gt; PayNotifyUrl()
{
//获取微信服务器异步发送的支付通知信息
var resHandler = new TenPayNotifyHandler(HttpContext);
var orderReturnJson = await resHandler.AesGcmDecryptGetObjectAsync&lt;OrderReturnJson&gt;();
var orderReturnJson = await resHandler.DecryptGetObjectAsync&lt;OrderReturnJson&gt;();

//获取支付状态
string trade_state = orderReturnJson.trade_state;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public async Task&lt;IActionResult&gt; RefundNotifyUrl()
try
{
var resHandler = new TenPayNotifyHandler(HttpContext);
var refundNotifyJson = await resHandler.AesGcmDecryptGetObjectAsync&lt;RefundNotifyJson&gt;();
var refundNotifyJson = await resHandler.DecryptGetObjectAsync&lt;RefundNotifyJson&gt;();

WeixinTrace.SendCustomLog(&quot;跟踪RefundNotifyUrl信息&quot;, refundNotifyJson.ToJson());

Expand Down
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>4.20.5</Version>
<Version>4.20.6</Version>
<AssemblyName>Senparc.Weixin.Open</AssemblyName>
<RootNamespace>Senparc.Weixin.Open</RootNamespace>
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
Expand Down Expand Up @@ -226,7 +226,8 @@
[2024-08-06] v4.18.4 更新基础库,包括 Senparc.CO2NET 相关库、Senparc.AI
[2024-08-11] v4.20.0.0 1、添加查询小程序是否已完成交易结算管理确认 2、添加第三方小程序订单页设置结果及审核结果事件通知 #3055 感谢 @mc7246
[2024-09-10] v4.20.2 icp verifytask 接口 data 不能为 null 的问题处理 #3067 感谢 @mojinxun
</PackageReleaseNotes>
[2024-11-03] v4.20.6 fix wxa ap is get qr code async Issue #3089, PR #3090 感谢 @JaneConan
</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 @@ -45,6 +45,9 @@ and limitations under the License.
修改标识:mc7246 - 20210930
修改描述:v4.11.500 添加第三方代码提审资料上传接口
修改标识:JaneConan - 20241103
修改描述:v4.20.6 fix wxa ap is get qr code async Issue #3089, PR #3090
----------------------------------------------------------------*/


Expand Down Expand Up @@ -97,12 +100,13 @@ public static CodeResultJson Commit(string accessToken, int template_id, string
/// <summary>
/// 获取小程序的体验二维码
/// </summary>
/// <param name="accessToken">从第三方平台获取到的该小程序授权</param>
/// <param name="accessToken">从第三方平台获取到的该小程序授权。第三方平台接口调用凭证authorizer_access_token,该参数为 URL 参数,非 Body 参数。(必填)</param>
/// <param name="path">指定二维码扫码后直接进入指定页面并可同时带上参数。(可选) </param>
/// <param name="timeOut"></param>
[NcApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "CodeApi.GetQRCode", true, ApiRequestMethod = CO2NET.WebApi.ApiRequestMethod.Get)]
public static CodeResultJson GetQRCode(string accessToken, Stream stream, int timeOut = Config.TIME_OUT)
public static CodeResultJson GetQRCode(string accessToken, string path, Stream stream, int timeOut = Config.TIME_OUT)
{
var url = string.Format(Config.ApiMpHost + "/wxa/get_qrcode?access_token={0}", accessToken.AsUrlData());
var url = string.Format(Config.ApiMpHost + "/wxa/get_qrcode?access_token={0}&path={1}", accessToken.AsUrlData(), path.AsUrlData());

Get.Download(CommonDI.CommonSP, url, stream);
return new CodeResultJson()
Expand Down

0 comments on commit 014ddf2

Please sign in to comment.