Senparc.Weixin WeChat .NET SDK

repository·master·Indexed 27 days ago

https://github.com/jeffreysu/weixinmpsdk

A comprehensive .NET SDK for integrating with the WeChat ecosystem, including Official Accounts (MP), Mini Programs (WxOpen), Enterprise WeChat (Work), and WeChat Pay (V2/V3). It supports .NET 6.0, .NET Core 2.x/3.x, .NET Standard 2.x, and .NET Framework 4.6.2+, providing high-level abstractions for API interaction, message handling, and distributed caching via Redis or Memcached.

Tokens
69.3K
Snippets
124
Records
339
Agent score
93%

What's inside WeiXinMPSDK

  1. Overview of Senparc.Weixin.WxOpen

    master

    The Senparc.Weixin.WxOpen library is a C# SDK specifically designed for WeChat Mini Programs. It is built upon the Senparc.Weixin SDK but is decoupled to provide specialized support for Mini Program features.

    Key capabilities include:

    • Server-side API integration for all WeChat Mini Program features.
    • Deep optimization for Mini Program specific communication, including standard messaging and WebSocket support.
    • Dedicated resources and tutorials for Mini Program development.
  2. Overview of Senparc.Weixin SDK

    master

    Senparc.Weixin is a comprehensive .NET SDK for the WeChat ecosystem. It allows developers to build applications for Official Accounts, Mini Programs, Mini Games, Enterprise WeChat (Work WeChat), Open Platform, WeChat Pay, JS-SDK, and WeChat hardware/Bluetooth.

    Key features:

    • Broad Framework Support: Compatible with .NET 3.5, 4.0, 4.5, .NET Standard 2.x, .NET Core 2.x, .NET Core 3.x, .NET 6.0, .NET 7.0, .NET 8.0, and .NET 10.0.
    • Decoupled Architecture: Works with MVC, Razor, WebApi, Console, desktop apps (.exe), Blazor, MAUI, and background services without being tied to a specific framework.
    • Modular Design: Modules are independently published to NuGet, allowing you to install only what you need or use the Senparc.Weixin.All package to include everything.
  3. Overview of Senparc.Weixin WeChat .NET SDK

    master

    Senparc.Weixin is a comprehensive .NET SDK designed for developing WeChat full-platform applications. It supports a wide range of WeChat modules including:

    • WeChat Public (Official Accounts)
    • Applets
    • Games
    • Enterprise WeChat
    • Open Platform
    • WeChat Pay
    • JS-SDK
    • WeChat Hardware/Bluetooth

    The SDK is suitable for both professional application development and beginners learning .NET programming.

  4. Overview of WeiXinMPSDK

    master
    WeiXinMPSDK (Senparc.Weixin) is a .NET SDK designed to build extended applications for various WeChat platforms. It provides high-level abstractions for interacting with WeChat's ecosystem, including Official Accounts (MP), Mini Programs (WxOpen), WeChat Work, and TenPay payment services (V2/V3). The SDK is designed for scalability and supports extension modules like caching and WebSocket.
  5. Overview of WeChat Developer AI Assistant

    master

    The WeChat Developer AI Assistant is a Chrome browser extension designed to assist developers working within the WeChat ecosystem. It provides AI-driven API queries and code generation directly on official WeChat documentation pages.

    Core Features

    • Smart Detection: Automatically identifies official WeChat documentation pages.
    • One-Click Activation: Displays an "AI Assistant" button on supported pages.
    • Context Awareness: Automatically retrieves current page information to provide targeted development advice.
    • Code Generation: Generates code examples based on the API documentation currently being viewed.
    • SDK Integration: Deeply integrated with the Senparc.Weixin SDK to provide best practices.

    Supported Domains

    • developers.weixin.qq.com (WeChat Developer Documentation)
    • pay.weixin.qq.com (WeChat Pay Documentation)
    • Other official WeChat technical documentation sites.
  6. Overview of Senparc.Weixin SDK Modules

    master
    The Senparc.Weixin SDK is a comprehensive .NET suite for WeChat development. It supports multiple target frameworks including .NET Framework, .NET Standard 2.x, and .NET 6.0+. The repository is organized into specialized modules covering different aspects of the WeChat ecosystem.
  7. Implement distributed caching for Senparc.Weixin

    master

    The Senparc.Weixin.Cache namespace provides extension strategies for implementing distributed caching within the WeChat .NET SDK. You can choose between two primary providers depending on your infrastructure requirements:

    1. Memcached: Use Senparc.Weixin.Cache.Memcached for a Memcached-based caching strategy.
    2. Redis: Use Senparc.Weixin.Cache.Redis for a Redis-based caching strategy.
  8. Use the BankComponent API module for WeChat Pay V3

    master

    The BankComponent module implements WeChat Pay V3 bank component APIs, allowing you to query bank information, supported banks, provinces, cities, and branches.

    Available APIs

    • Query Bank Account Opening Bank: Retrieve bank information using a personal bank card number.
    • Query Supported Banks: Retrieve a list of banks that support personal business.
    • Query Province List: Retrieve a list of supported provinces.
    • Query City List: Retrieve a list of cities based on a specific province.
    • Query Branch List: Retrieve a list of branches based on a bank and city.

    API Base Path

    All bank component APIs use the base path: v3/capital/capitallhh

  9. Understand .csproj project file structures

    master

    The repository contains different .csproj files depending on the solution you are using:

    • Senparc.Weixin.csproj: Used for the Senparc.Weixin.MP.Sample.sln solution.
    • Senparc.Weixin.src.csproj: Used for independent projects such as Senparc.Weixin.net45.sln and Senparc.Weixin.Libraries.sln.
    • Senparc.WebSocket.src.vs2017: Used for the Senparc.Weixin.MP.Sample.vs2017.sln solution.