Skip to content

Commit

Permalink
Merge pull request #2259 from JeffreySu/Developer
Browse files Browse the repository at this point in the history
Developer
  • Loading branch information
JeffreySu authored Oct 16, 2020
2 parents 381815b + 3c91950 commit 64553f3
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@ packages/
/Samples/netcore3.0-mvc/Senparc.Weixin.Sample.NetCore3/App_Data/QrCode
/src/Senparc.Weixin.Cache/Senparc.Weixin.Cache.Redis.Tests/App_Data/SenparcTraceLog
/Samples/netcore3.0-mvc/Senparc.Weixin.Sample.NetCore3/appsettings.Development.json
/Samples/netcore3.0-mvc/Senparc.Weixin.Sample.NetCore3/App_Data/WeChat_OfficialAccount
/Samples/netcore3.0-mvc/Senparc.Weixin.Sample.NetCore3/App_Data/WeChat_OfficialAccount
/Samples/netcore3.0-mvc/.idea
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
<PackageReference Include="Senparc.NeuChar" Version="1.2.200.6" />
<PackageReference Include="Senparc.NeuChar" Version="1.2.201" />
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="4.3.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
using Senparc.Weixin.MP;
using Senparc.CO2NET;
using Senparc.CO2NET.Trace;
using Senparc.Weixin.MP.Entities;

namespace Senparc.Weixin.Sample.NetCore3.Controllers
{
Expand Down Expand Up @@ -280,7 +281,7 @@ public ActionResult Native()

throw;
}

}

public ActionResult NativeNotifyUrl()
Expand Down Expand Up @@ -727,6 +728,18 @@ public ActionResult RefundNotifyUrl()
string nonce_str = resHandler.GetParameter("nonce_str");
string req_info = resHandler.GetParameter("req_info");

if (appId.Equals(Senparc.Weixin.Config.SenparcWeixinSetting.TenPayV3_AppId))
{
/*
* 注意:
* 这里添加过滤只是因为盛派Demo经常有其他公众号错误地设置了我们的地址,
* 导致无法正常解密,平常使用不需要过滤!
*/
SenparcTrace.SendCustomLog("RefundNotifyUrl 的 AppId 不正确",
$"appId:{appId}\r\nmch_id:{mch_id}\r\nreq_info:{req_info}");
return Content("faild");
}

var decodeReqInfo = TenPayV3Util.DecodeRefundReqInfo(req_info, TenPayV3Info.Key);
var decodeDoc = XDocument.Parse(decodeReqInfo);

Expand Down Expand Up @@ -1061,7 +1074,7 @@ public ActionResult H5Pay(int productId, int hc)
var price = product == null ? 100 : (int)(product.Price * 100);
//var ip = Request.Params["REMOTE_ADDR"];
var xmlDataInfo = new TenPayV3UnifiedorderRequestData(TenPayV3Info.AppId, TenPayV3Info.MchId, body, sp_billno, price, HttpContext.UserHostAddress()?.ToString(), TenPayV3Info.TenPayV3Notify, TenPay.TenPayV3Type.MWEB/*此处无论传什么,方法内部都会强制变为MWEB*/, openId, TenPayV3Info.Key, nonceStr);

SenparcTrace.SendCustomLog("H5Pay接口请求", xmlDataInfo.ToJson());

var result = TenPayV3.Html5Order(xmlDataInfo);//调用统一订单接口
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>5.600.4</Version>
<Version>5.600.6</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<PackageReference Include="System.Xml.XPath.XmlDocument" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Senparc.NeuChar" Version="1.2.200.6" />
<PackageReference Include="Senparc.NeuChar" Version="1.2.201" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Senparc.Weixin.AspNet\Senparc.Weixin.AspNet.netcore3.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ public void ConvertEntityToXml_NullableTest()
</ResultList>
<CheckState>2</CheckState>
</CopyrightCheckResult>
<ArticleUrlResult>
<Count>2</Count>
<ResultList>
<item>
<ArticleIdx>1</ArticleIdx>
<ArticleUrl><![CDATA[Url_1]]></ArticleUrl>
</item>
<item>
<ArticleIdx>2</ArticleIdx>
<ArticleUrl><![CDATA[Url_2]]></ArticleUrl>
</item>
</ResultList>
</ArticleUrlResult>
</xml>";


Expand All @@ -154,6 +167,13 @@ public void FillEntityWithEmbedXmlTest()
Assert.AreEqual(2,strongEntity.CopyrightCheckResult.Count);
Assert.AreEqual("Url_1", strongEntity.CopyrightCheckResult.ResultList[0].item.OriginalArticleUrl);
Assert.AreEqual("Url_2", strongEntity.CopyrightCheckResult.ResultList[1].item.OriginalArticleUrl);


Assert.AreEqual(2,strongEntity.ArticleUrlResult.Count);
Assert.AreEqual(2, strongEntity.ArticleUrlResult.ResultList[1].item.ArticleIdx);
Assert.AreEqual("Url_1", strongEntity.ArticleUrlResult.ResultList[0].item.ArticleUrl);
Assert.AreEqual("Url_2", strongEntity.ArticleUrlResult.ResultList[1].item.ArticleUrl);

}

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ and limitations under the License.
修改标识:Senparc - 20150303
修改描述:整理接口
修改标识:ccccccmd - 20201016
修改描述:v16.10.601 MASSSENDJOBFINISH事件增加 ArticleUrlResult 节点,
----------------------------------------------------------------*/

using Senparc.NeuChar.Entities;
Expand Down Expand Up @@ -76,6 +80,19 @@ namespace Senparc.Weixin.MP.Entities
// </ResultList>
// <CheckState>2</CheckState>
// </CopyrightCheckResult>
// <ArticleUrlResult>
// <Count>2</Count>
// <ResultList>
// <item>
// <ArticleIdx>1</ArticleIdx>
// <ArticleUrl><![CDATA[Url_1]]></ArticleUrl>
// </item>
// <item>
// <ArticleIdx>2</ArticleIdx>
// <ArticleUrl><![CDATA[Url_2]]></ArticleUrl>
// </item>
// </ResultList>
// </ArticleUrlResult>
//</xml>

/// <summary>
Expand Down Expand Up @@ -129,10 +146,18 @@ public override Event Event
/// </summary>
public CopyrightCheckResult CopyrightCheckResult { get; set; }

/// <summary>
/// 群发文章的 URL
/// </summary>
public ArticleUrlResult ArticleUrlResult { get; set; }

public RequestMessageEvent_MassSendJobFinish()
{
CopyrightCheckResult = new CopyrightCheckResult();
ArticleUrlResult = new ArticleUrlResult();
}


}

//public class CopyrightCheckResult
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0;netstandard2.1</TargetFrameworks>
<Version>16.10.600</Version>
<Version>16.10.601</Version>
<AssemblyName>Senparc.Weixin.MP</AssemblyName>
<RootNamespace>Senparc.Weixin.MP</RootNamespace>
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
Expand Down Expand Up @@ -498,7 +498,8 @@
v16.10.502.2 添加微信电子发票 2.3 接收授权完成事件的处理
v16.10.502.3 "获取授权页链接数据开票来源"属性的枚举类型序列化字符串优化
v16.10.502.3 完善“新增永久视频素材”接口参数
</PackageReleaseNotes>
v16.10.601 MASSSENDJOBFINISH事件增加 ArticleUrlResult 节点
</PackageReleaseNotes>
<RepositoryUrl>https://github.com/JeffreySu/WeiXinMPSDK</RepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down Expand Up @@ -557,7 +558,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Senparc.CO2NET.APM" Version="0.9.200" />
<PackageReference Include="Senparc.NeuChar" Version="1.2.200.6" />
<PackageReference Include="Senparc.NeuChar" Version="1.2.201" />
<PackageReference Include="Senparc.NeuChar.App" Version="0.8.200" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
<Folder Include="WxaAPIs\Template\TemplateJson\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Senparc.NeuChar" Version="1.2.200.6" />
<PackageReference Include="Senparc.NeuChar" Version="1.2.201" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Senparc.Weixin\Senparc.Weixin\Senparc.Weixin.netcore3.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Senparc.NeuChar" Version="1.2.200.6" />
<PackageReference Include="Senparc.NeuChar" Version="1.2.201" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Senparc.Weixin\Senparc.Weixin\Senparc.Weixin.netcore3.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Senparc.NeuChar" Version="1.2.200.6" />
<PackageReference Include="Senparc.NeuChar" Version="1.2.201" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Senparc.Weixin.MP\Senparc.Weixin.MP\Senparc.Weixin.MP.netcore3.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Senparc.CO2NET" Version="1.3.200" />
<PackageReference Include="Senparc.NeuChar" Version="1.2.200.6" />
<PackageReference Include="Senparc.NeuChar" Version="1.2.201" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
<Reference Include="System.Core" />
Expand Down

0 comments on commit 64553f3

Please sign in to comment.