Zongsoft.Externals.Wechat.Gateway 8.0.0

dotnet add package Zongsoft.Externals.Wechat.Gateway --version 8.0.0
                    
NuGet\Install-Package Zongsoft.Externals.Wechat.Gateway -Version 8.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Zongsoft.Externals.Wechat.Gateway" Version="8.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zongsoft.Externals.Wechat.Gateway" Version="8.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Zongsoft.Externals.Wechat.Gateway" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Zongsoft.Externals.Wechat.Gateway --version 8.0.0
                    
#r "nuget: Zongsoft.Externals.Wechat.Gateway, 8.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Zongsoft.Externals.Wechat.Gateway@8.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Zongsoft.Externals.Wechat.Gateway&version=8.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Zongsoft.Externals.Wechat.Gateway&version=8.0.0
                    
Install as a Cake Tool

Zongsoft.Externals.Wechat.Gateway

English | 简体中文

Features and Configuration

This plugin receives WeChat Pay APIv3 payment, refund and offline face agreement notifications. The main adapter supplies merchant configuration, signature verification and resource decryption. Application management endpoints belong to the Web API package.

POST route Supported events
/Externals/Wechat/Fallback/payment/{merchant} TRANSACTION.SUCCESS
/Externals/Wechat/Fallback/refundment/{merchant} REFUND.SUCCESS, REFUND.ABNORMAL, REFUND.CLOSED
/Externals/Wechat/Fallback/offlinefaceagreement/{merchant} FACEPAY.USER_STATE_CHANGE

merchant is the configured merchant or service provider number, digits only, without role suffixes. Query parameters are rejected. Requests require JSON content and are limited to 2 MiB. Public account messages, third-party authorization events and GET URL verification are outside these routes.

Configure ApiV3Key, an explicit verification mode and permitted applications as described in merchant credentials. The adapter verifies the original bytes and a five-minute timestamp window before authenticated decryption and event/merchant checks. The application must validate business ownership, amounts, currency and durable deduplication.

Business Handlers

Derive from PaymentHandlerBase, RefundmentHandlerBase or the relevant FallbackHandlerBase<TRequest>. Override OnReceiveAsync when using durable acceptance. Register IFallbackHandler objects at /Workbench/Externals/Wechat/Fallback/Handlers under Payment, Refundment or OfflineFaceAgreement, matching their Kind. Registration happens during startup, before serving requests.

Completed, Accepted and Duplicate produce an empty HTTP 204 response. Accepted means the application durably owns the notification and subsequent processing/recovery. Rejection, processing failure or the four-second acceptance deadline produces 503; malformed input produces 400, server body limits may produce 413, and unknown routes produce 404. Handler failure responses contain JSON code=FAIL without exception details.

The typed HandleAsync method is for trusted local calls and does not verify network notifications. External requests must use ReceiveAsync. Use TLS and exclude keys and complete payment/user payloads from logs. See the notification contract for details.

Plugin-Based Integration

Compose this feature through the host; a package reference supplies compile-time APIs, while plugin loading also requires deployed manifests and runtime assets. See the complete plugin workflow.

Use a Plugins.Web host and deploy the corresponding main adapter listed below. Service/controller discovery runs during host initialization; do not put business logic into Program.cs. Verify the configured endpoint and authorization before accepting requests.

Runtime artifact Source of truth
Zongsoft.Externals.Wechat.Gateway Zongsoft.Externals.Wechat.Gateway.plugin
File copying and dependencies Zongsoft.Externals.Wechat.Gateway.deploy

Add this fragment to an existing host .deploy (retain Main and the host’s other base manifests; do not replace the whole file):

[plugins zongsoft externals wechat]
nuget:Zongsoft.Externals.Wechat@8.0.0

[plugins zongsoft externals wechat gateway]
nuget:Zongsoft.Externals.Wechat.Gateway@8.0.0

Run dotnet deploy against a test deployment as explained in the workflow, with the host's framework, platform, architecture and, where needed, site. Pin compatible versions in real deployments; application dependencies such as databases, caches or commercial runtimes are still separate prerequisites.

Additional artifacts listed by the deployment manifest include Zongsoft.Externals.Wechat.Gateway.plugin. Retain assemblies, dependencies and satellite resource directories as well. Restart the host after deployment, check plugin loading and service/driver registration, then verify the workflow above; copied files alone do not prove that the feature is active.

Third-party platform authorization events

POST /Externals/Wechat/Components/{componentAppId}/Events accepts encrypted XML for verification tickets and authorization changes. Configure the component separately and register a durable IComponentStore. Verified, reliably stored events return success; storage failures return 503. See the component contract for size limits, signature rules, idempotency and host responsibilities. This route does not receive authorizer messages or create tenant associations automatically.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0 96 11/15/2026
7.11.0 101 11/8/2026
7.10.0 112 10/23/2026
7.4.0 107 10/22/2026
7.3.0 107 10/10/2026
7.2.0 172 1/11/2026
7.1.0 579 3/26/2025
7.0.0 223 2/24/2025