feat(tenpayv3): 独立化境外支付 API

This commit is contained in:
Fu Diwei
2024-05-06 20:50:58 +08:00
parent 2e19fc8aa1
commit 9b18df8f2e
850 changed files with 2016 additions and 1088 deletions

View File

@@ -7,5 +7,5 @@
"fail_reason": "PAYEE_ACCOUNT_ABNORMAL",
"openid": "o-MYE42l80oelYMDE34nYD456Xoy",
"create_time": "2015-05-20T13:29:35.120+08:00",
"update_time": "example_update_time"
"update_time": "2015-05-20T13:29:35.120+08:00"
}

View File

@@ -6,6 +6,8 @@ using Xunit;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests
{
using SKIT.FlurlHttpClient.Wechat.TenpayV3.ExtendedSDK.Global;
public class CodeAnalyzeTests
{
// NOTICE:
@@ -14,6 +16,14 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests
[Fact(DisplayName = "代码质量分析")]
public void CodeAnalyze()
{
Assert.Multiple(
CodeAnalyze_BaseSDK,
CodeAnalyze_ExtendedSDK_Global
);
}
private void CodeAnalyze_BaseSDK()
{
Assert.Null(Record.Exception(() =>
{
@@ -24,6 +34,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests
SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.TenpayV3.Models",
SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.TenpayV3",
SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.TenpayV3.Events",
IgnoreExecutingExtensionTypes = static type => type.Namespace!.Contains(".ExtendedSDK."),
ThrowOnNotFoundRequestModelTypes = true,
ThrowOnNotFoundResponseModelTypes = true,
ThrowOnNotFoundExecutingExtensionTypes = true,
@@ -45,6 +56,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests
SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.TenpayV3.Events",
ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.Wechat.TenpayV3/"),
ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/"),
ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/_/",
ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/_/",
ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/_/",
ThrowOnNotFoundRequestModelClassCodeFiles = true,
ThrowOnNotFoundResponseModelClassCodeFiles = true,
ThrowOnNotFoundExecutingExtensionClassCodeFiles = true,
@@ -59,5 +73,51 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests
.AssertNoIssues();
}));
}
private void CodeAnalyze_ExtendedSDK_Global()
{
Assert.Null(Record.Exception(() =>
{
var options = new TypeDeclarationAnalyzerOptions()
{
SdkAssembly = Assembly.GetAssembly(typeof(WechatTenpayGlobalClient))!,
SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.TenpayV3.ExtendedSDK.Global.Models",
SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.TenpayV3.ExtendedSDK.Global.Models",
SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.TenpayV3.ExtendedSDK.Global",
ThrowOnNotFoundRequestModelTypes = true,
ThrowOnNotFoundResponseModelTypes = true,
ThrowOnNotFoundExecutingExtensionTypes = true
};
new TypeDeclarationAnalyzer(options).AssertNoIssues();
}));
Assert.Null(Record.Exception(() =>
{
string workdir = Environment.CurrentDirectory;
string projdir = Path.Combine(workdir, "../../../../../");
var options = new SourceFileAnalyzerOptions()
{
SdkAssembly = Assembly.GetAssembly(typeof(WechatTenpayGlobalClient))!,
SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.TenpayV3.ExtendedSDK.Global.Models",
SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.TenpayV3.ExtendedSDK.Global.Models",
ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.Wechat.TenpayV3/"),
ProjectSourceRequestModelClassCodeSubDirectory = "ExtendedSDK/Global/Models/",
ProjectSourceResponseModelClassCodeSubDirectory = "ExtendedSDK/Global/Models/",
ProjectSourceExecutingExtensionClassCodeSubDirectory = "ExtendedSDK/Global/Extensions/",
ProjectSourceWebhookEventClassCodeSubDirectory = "ExtendedSDK/Global/Events/",
ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.Wechat.TenpayV3.UnitTests/"),
ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/Global/",
ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/Global/",
ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/Global/",
ThrowOnNotFoundRequestModelClassCodeFiles = true,
ThrowOnNotFoundResponseModelClassCodeFiles = true,
ThrowOnNotFoundExecutingExtensionClassCodeFiles = true,
ThrowOnNotFoundRequestModelSerializationSampleFiles = true,
ThrowOnNotFoundResponseModelSerializationSampleFiles = true
};
new SourceFileAnalyzer(options).AssertNoIssues();
}));
}
}
}

Some files were not shown because too many files have changed in this diff Show More