feat(tenpayv2): 新增部分接口

This commit is contained in:
RHQYZ
2022-01-25 13:24:49 +08:00
committed by GitHub
parent 122cd5186c
commit 6458d08381
234 changed files with 11734 additions and 891 deletions

View File

@@ -0,0 +1,19 @@
using System.Threading.Tasks;
using Xunit;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests
{
public class TestCase_EventVerificationTests
{
[Fact(DisplayName = "测试用例:验证回调通知签名")]
public void TestVerifyEventSignature()
{
string callbackXml = "<xml><appid>wxd930ea5d5a258f4f</appid><mch_id>10000100</mch_id><device_info>1000</device_info><body>test</body><nonce_str>ibuaiVcKdpRxkhJA</nonce_str><sign>9A0A8659F005D6984697E2CA0A9CF3B7</sign></xml>";
string merchantId = "10000100";
string merchantSecret = "192006250b4c09247ec02edce69f6a2d";
var client = new WechatTenpayClient(merchantId, merchantSecret);
Assert.True(client.VerifyEventSignature(callbackXml));
}
}
}