1 Star 0 Fork 490

winshow.chen / WeiXinMPSDK

forked from JeffreySu / WeiXinMPSDK 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
Apache-2.0
Senparc.Weixin SDK

Senparc.Weixin —— Wechat .NET SDK

Build status NuGet GitHub commit activity the past week, 4 weeks, year license

[中文]

Wechat is the most famous IM APP in China which has more than 1 billion active users and more than ten million Official Accounts.

By using Senparc.Weixin SDK, you can develop all wechat platform applications, including Official Account, Mini Programm, Mini Game, Enterprise Account, Open Platform, Wechat Pay, JS-SDK, Wechat IoT/Bluetooth, etc.

Now, Senparc.Weixin has been supported almost all of the API for Wechat's all modules. It supports mutipule .Net targets .NET 3.5 / 4.0 / 4.5 / .NET Standard 2.x / .NET Core 2.x / .NET Core 3.x / .NET 6.0.

Senparc.Weixin SDK is the most widly used .NET Wechat SDK. Also it is one of the most popular .NET open source project in China.

For more than 8 years, we have been keeping the project constantly updated, share the complete source code and design ideas without reservation. Hopefully more people will benefit from it, understand and disseminate the spirit of open source. Grateful to the friends who helped us along the way!

If you like and hope us to continue to optimize this project, please give us a Star:)

Notice

:trophy:2020-2021 Outstanding Contributors of Senparc Developer Community Shortlist》 has been published. Please check and register the information before 13/9/2021 10:24 AM :smile:
🔒 TenPay V3 Module has been released!
⚡ Sample has already supported for .NET 6.0, Click Here !
🍦 file.api.weixin.qq.com Domain name officially disabled(2020.9.15), please update to the latest version!

Index

The library contains the source code (the Core logic is exactly the same) that includes .Net 3.5/4.0/4.5/.NET Standard 2.0/.NET Core/.NET 6.

SDK Modules

# Module Libraries DLL Nuget Support .NET Versions
1 Base Library Senparc.Weixin.dll Senparc.Weixin
Senparc.Weixin
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
2 Official Account /
JSSDK
ect.
Senparc.Weixin.MP.dll MP
MP
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
3 Mini Program
(s.p. Mini Game)
(indep. proj.)
Senparc.Weixin.WxOpen.dll WxOpen
WxOpen
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
4 Tencent Pay(TenPay) Senparc.Weixin.TenPay.dll TenPay
TenPay
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
5 Tencent Pay(TenPay) V3 Senparc.Weixin.TenPayV3.dll TenPayV3
TenPay
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
6 ASP.NET MVC Extension Senparc.Weixin.MP.MVC.dll         MP.MVC
Mvc
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
7 Corporate Account Senparc.Weixin.QY.dll QY
QY
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
8 Corporate Wechat Senparc.Weixin.Work.dll Work
Work
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
9 Open Platform Senparc.Weixin.Open.dll Open
Open
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
10 Redis Distributed Cache Senparc.Weixin.Cache.
Redis.dll
Cache.Redis
Redis
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
11 Memcached
Distributed Cache
Senparc.Weixin.Cache.
Memcached.dll
Cache.Memcached
MC
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0
12 WebSocket
(indep. proj.)
 
Senparc.WebSocket.dll Senparc.WebSocket
WebSocket
.NET 4.5 .NET Standard 2.0/2.1 .NET Core .NET 5.0 / 6.0

Legend

.NET 4.5 .NET Standard 2.x .NET Core .NET 5.0 / 6.0
.NET 4.5.1 .NET Standard 2.0 / 2.1 .NET Core 2.x / 3.x .NET 5.0 / .NET 6.0

Tip:

  1. .NET 3.5 .NET 4.0 last stable release click here (minimum .NET 4.5.1 support from November 7, 2021), since May 1, 2019 to stop updating.
  2. The .NET Framework 4.5 update is scheduled to end on December 31, 2024. It's strongly advice you to use .NET 3.1 or .NET 6.0+ for new projects.

Functional Support

  • Supported all Wechat 8.x APIs, includes customize menu / personalized menu, template message, material APIs, group message, multi-customer service, TenPay, MerChant, cards APIs, ect.
  • Supported Wechat Official Account, MiniProgram, MiniProgram-Game, Enterpaise Account, Open Platform modules.
  • Supported user dialogue context, to solve application service can not use Session to handle users' dialogues.
  • Fully supported latest APIs for Wechat Official Account, Corporate Account(Corporate Wechat), TenPay V2/V3, Open Platform.
  • Supported Distributed Cache Strategy with high scalability.

All updates will ensure downward compatibility unless otherwise specified. So you can cover new DLLs directly or use Nuget to manage packages(highly recommend).

Personalize your WeChat project Sample

Web version:view course

WeChatSampleBuilder

Notice: using the WeChatSampleBuilder tool simply makes it easier for you to test and learn the Sample code, not to generate a complete production environment project. If you need to build a production environment project, refer to the full Demo or other tutorials. It is recommended to use an existing system framework, such as NeuCharFramework.

resources

  1. Senparc.Weixin SDK Official Site: https://weixin.senparc.com/
  2. Online Demo Site:https://sdk.weixin.senparc.com/
  3. Blog tutorial: https://www.cnblogs.com/szw/archive/2013/05/14/weixin-course-index.html
  4. WeChat technology exchange community: https://weixin.senparc.com/QA
  5. Online editing tool for Customize menu: https://sdk.weixin.senparc.com/Menu
  6. Online test tool for Messages: https://sdk.weixin.senparc.com/SimulateTool
  7. Online test tool for Cache:https://sdk.weixin.senparc.com/Cache/Test
  8. chm documentation download:https://sdk.weixin.senparc.com/Document
  9. Source code and the latest updates : https://github.com/JeffreySu/WeiXinMPSDK
  10. WeChat development resources: https://github.com/JeffreySu/WeixinResource
  11. Depth Analysis of WeChat Development reading system:https://book.weixin.senparc.com
  12. Buy Depth Analysis of WeChat Developmenthttps://item.jd.com/12220004.html
  13. Video Course:https://github.com/JeffreySu/WechatVideoCourse
  • Technical communication QQ group:

5th group(Official Account): 377815480 14th Group(Video Course Student Group):588231256
(Official Account): 289181996
10th Group(Distributed Cache): 246860933
12th Group(Mini Program): 108830388
16h Group(Open Platform): 860626938
the following groups are full:
1st group:300313885(full),2nd group:293958349(full),3rd group:342319110(full)
4th group:372212092(full),6th group:425898825(full)
7th group:482942254(full),8th group:106230270(full),9th group:539061281(full)
11th group:553198593(full),13th group: 183424136(full),15th Group:289181996(full)

  • Business contact QQ:498977166

If this project is useful to you, we welcome any form of donations from all parties, including participation in project code updates or feedback. Thank you!

donate: Enter

Senparc official tutorials

By Jeffrey Su and Senparc team took 2 years to complete the development of WeChat book have been published, the book's full name is: Depth Analysis of WeChat Development: the efficient development of the Official Account and Mini Program, the auxiliary reading system has been on the line: BookHelper
Welcome to buy genuine books:【Buy】
The branch of code snapshot for the book published version BookVersion1

Follow Demo Official Account(SenparcRobot):

Senparc Helper Official Account Senparc Helper Mini-Program BookHelper

Develop with .Net Core

Current branch including .NET Framework 4.5 / 4.6.1 及 .NET Core 2.0 + 2.1 / .NET 5.0 + 6.0 full version codes. For the assembly which has been stoped update version, please see snapshot release.
.NET Framework 4.5 Demo under /src/Samples/All/net45-mvc directory,
.NET 6.0 (backward compatibility with.NET 5.0 and.NET Core 3.1 and lower versions) Demo under /Samples/All/net6-mvc directory.

Attention: in the above Samples, the Sample in 'net6-MVC' directly references the source code of each module, which can be compiled with 'Release' to generate a compatible SDK library for different versions of Senaprc.Weixin SDK.

All of the following introduction use the example of the .NET Framework 4.5.

Contribute Code

If you need to use or modify the program source code, recommended to Fork. We also welcome you to modify the generic version of Pull Request.

  1. Fork
  2. Create your own branch (git checkout -b my-new-feature)
  3. Submit your changes (git commit -am'Added some feature')
  4. Submit modify records to a remote warehouse (git push origin git my-new-feature)
  5. And then go to the my-new-feature branch of the git on GitHub site, launch Pull Request (Please refer to Developer branch, not directly submitted to the master branch)

Project folder description (under src folder)

Folder Description
Senparc.WebSocket WebSocket Module
Senparc.Weixin.Cache Senparc.Weixin.Cache.Memcached.dll 、 Senparc.Weixin.Cache.Redis.dll Distributed Cache extension solutions
Senparc.Weixin.AspNet Senparc.Weixin.AspNet.dll library support for Web project
Senparc.Weixin.MP.MvcExtension Senparc.Weixin.MP.MvcExtension.dll source code, extension for ASP.NET MVC
Senparc.Weixin.MP Senparc.Weixin.MP.dll, Official Account SDK source code
Senparc.Weixin.MP.Middleware Senparc.Weixin.MP.Middleware.dll,Official Account Middleware source code
Senparc.Weixin.Open Senparc.Weixin.Open.dll, 3rd Open Platform SDK source code
Senparc.Weixin.QY Senparc.Weixin.QY.dll, Corporate Account SDK source code
Senparc.Weixin.Work Senparc.Weixin.Work.dll Corporate Wechat SDk source code
Senparc.Weixin.Work.Middleware Senparc.Weixin.Work.Middleware.dll Corporate Wechat Middleware source code
Senparc.Weixin.WxOpen Senparc.Weixin.WxOpen.dll Mini Program SDK source code. Include Mini Game.
Senparc.Weixin.WxOpen.Middleware Senparc.Weixin.WxOpen.Middleware.dll Mini Program Middleware source code.
Senparc.Weixin all Senparc.Weixin.[x].dll base library source code

Sample folder description (under Samples folder)

Folder Description SDK Library Reference
MP Official Account Sample Source Code
TenPayV2 Tencent Payment V1 & V2 Sample Source Code
TenPayV3 Tencent Payment V3(TenPay APIv3) Sample Source Code
Work Enterprice Account Sample Source Code
WxOpen Mini-Program Sample Source Code
Shared All Sample's common shared files
All Including integration of all subordinate modules: Official Account, Mini-Program, Enterprice Account, Tencent Payment(V2 & V3 & APIv3). Recommended project references for integrating multiple platforms
(advanced references)
All/net45-mvc Demo, can be released directly(.NET Framework 4.5 + ASP.NET MVC) Nuget Packages
All/console Console Demo(.NET Core) Source Code
All/net6-mvc Demo, can be released directly(.NET 6.0), compatible with .NET 5.0 and .NET Core Source Code

Senparc.Weixin.MP.Sample Key Code

Note: This is MVC projct, you can learn corresponding file in WebForm project.

/Controllers/WeixinController.cs

The following Token needs to be synchronized with the Token synchronization in the background Settings of the WeChat Official Account Site(https://mp.weixin.qq.com). You can set the Token string in database or config file like Web.cofing. It's strongly recommend to use complex string, because the request is easy to forge while the Token is cracked.

public readonly string Token = "weixin";

The following Action (Get) is used to receive and return the validation results of the WeChat background Url without any changes. Address such as http://domain/Weixin or http://domain/Weixin/Index

/// <summary>
/// WeChat background validation Url (Get request), such as http://weixin.senparc.com/weixin
/// </summary>
[HttpGet]
[ActionName("Index")]
public ActionResult Get(PostModel postModel, string echostr)
{
    if (CheckSignature.Check(postModel.Signature, postModel.Timestamp, postModel.Nonce, Token))
    {
        return Content(echostr); //返回随机字符串则表示验证通过
    }
    else
    {
        return Content("failed:" + postModel.Signature + "," 
            + MP.CheckSignature.GetSignature(postModel.Timestamp, postModel.Nonce, Token) + "。" +
            "If you see this message in browser, that means this url address can be used in Wechat Official Account background setting for validation Url. Please note that the Token is consistent.");
    }
}

In above methods, PostModel is an entity including Signature, Timestamp, Nonce (by WeChat server via the incoming request Url parameter), AppId and Token, EncodingAESKey and a series of internal sensitive information (need to pass it in) entity class. PostModel also used in the rear.

The following Action (Post) used to receive Post request from WeChat server (usually initiated by the user), if necessary, here before you Get only provide WeChat background save Url validation, every Post must revalidate, otherwise it's easy to forge the request.

/// <summary>
/// After the user sends the message, the WeChat platform automatically posts a request to this place and waits for the response XML
/// </summary>
[HttpPost]
[ActionName("Index")]
public ActionResult Post(PostModel postModel)
{
    if (!CheckSignature.Check(postModel.Signature, postModel.Timestamp, postModel.Nonce, Token))
    {
        return Content("Parameter error!");
    }
    ...
}

How to handle WeChat Official Account request?

Senparc.Weixin.MP provides two ways to process requests, traditional methos and MessageHandler (recommended).

The above two methods have been described in more detail in the wiki, which is a simple example of the MessageHandler method.

The MessageHandler process is very simple:

[HttpPost]
[ActionName("Index")]
public ActionResult Post(PostModel postModel)
{
    if (!CheckSignature.Check(postModel.Signature, postModel.Timestamp, postModel.Nonce, Token))
    {
        return Content("Parameter error!");
    }

    postModel.Token = Token;
    postModel.EncodingAESKey = EncodingAESKey;//Be consistent with your Settings in the background
    postModel.AppId = AppId;//Be consistent with your Settings in the background


    var messageHandler = new CustomMessageHandler(Request.InputStream, postModel);//Receive messages (first step)

    messageHandler.Execute();//Processing (step 2)

    return new FixWeixinBugWeixinResult(messageHandler);//Return (step 3)
}

In addition to the postModel assignment, the receipt (step 1), processing (step 2), and return (step 3) will only need one line of code.

CustomMessageHandler in the code above is a custom class that inherits from Senparc.Weixin.MP.MessageHandler.cs. MessageHandler is an abstract class that contains the request perform a variety of different types of abstract methods (such as text, voice, location, pictures, etc.), we only need to create your own CustomMessageHandler in each of these methods is implemented.The newly built CustomMessageHandler.cs is as follows:

using System;
using System.IO;
using Senparc.Weixin.MP.MessageHandlers;
using Senparc.Weixin.MP.Entities;

namespace Senparc.Weixin.MP.Sample.CustomerMessageHandler
{
    public class CustomMessageHandler : MessageHandler<MessageContext>
    {
        public public CustomMessageHandler(Stream inputStream, PostModel postModel, int maxRecordCount = 0)
            : base(inputStream, postModel, maxRecordCount)
        {

        }

        public override IResponseMessageBase DefaultResponseMessage(IRequestMessageBase requestMessage)
        {
            //ResponseMessageText can also be other types like News
            var responseMessage = CreateResponseMessage<ResponseMessageText>();
            responseMessage.Content = "This message is from DefaultResponseMessage。";
            return responseMessage;
        }

        public override IResponseMessageBase OnTextRequest(RequestMessageText requestMessage)
        {
            //...
        }

        public override IResponseMessageBase OnVoiceRequest(RequestMessageVoice requestMessage)
        {
            //...
        }
        
        //More OnXX methods that are not overridden will return the result in DefaultResponseMessage by default.
        ....
    }
}

OnTextRequest and OnVoiceRequest correspond to different request types, such as receiving text and voice.

For example, we need to respond to text type requests, just perfect the OnTextRequest method:

      public override IResponseMessageBase OnTextRequest(RequestMessageText requestMessage)
      {
          //TODO: the logic can be dealt with to the Service details, reference OnLocationRequest method or /Service/LocationSercice.cs
          var responseMessage = CreateResponseMessage<ResponseMessageText>();
          responseMessage.Content = string.Format("You just sent the message:{0}", requestMessage.Content);
          return responseMessage;
      }

In this way, when the CustomMessageHandler executes the Messagehandler.execute(), it will automatically call the above code and return the ResponseMessage in the code to return the information if it finds that the type of the request information is Text. ResponseMessage can be any type under the IResponseMessageBase interface (including text, news, multimedia, etc.).

Starting with v0.4.0, the MessageHandler adds support for user Session context, which can be used to resolve defects on the server that can't use Session to manage user sessions. Details:User context WeixinContext and MessageContext

Use Nuget to install the project

How to handle WeChat Official Account?

PM> Install-Package Senparc.Weixin.MP

How to handle WeChat Mini Program (include Mini Game)?

Senparc.Weixin.WxOpen encapsulates the message and API of WeChat mini programs, keeping the development process of the Official Account request consistent. This module also support Mini Game.

PM> Install-Package Senparc.Weixin.WxOpen

How to enhance the functionality of ASP.NET MVC Project?

Senparc.Weixin.MP.MVC has done more optimization for ASP.NET MVC project, including convenient browser environment judgment, official bug fix, etc.

PM> Install-Package Senparc.Weixin.MP.MVC

How to handle WeChat Corporate Account?

Senparc.Weixin.QY.dll for Corporate Account encapsulation were conducted for the relevant functions, operation process remain the same with WeChat Official Account SDK (Senparc.Weixin.MP) .

PM> Install-Package Senparc.Weixin.QY

Note: QY has been stopped updating with the WeChat Corporate Account and has been seamlessly ported to Work (Corporate WeChat).

How to handle Corporate Wechat?

Senparc.Weixin.Work.dll for Corporate Wechat encapsulation were conducted for the relevant functions, operation process remain the same with WeChat Official Account SDK (Senparc.Weixin.MP) and WeChat Corporate Account (Senparc.Weixin.QY.dll).

PM> Install-Package Senparc.Weixin.Work

How to handle Wechat Open Platform?

Senparc.Weixin.Open.dll is encapsulatied all Open Platform APIs , message operation process remain the same with WeChat Official Account SDK (Senparc.Weixin.MP), some other special message process please read the official document, then compares Demo in the Senparc.Weixin.MP.Sample project.

PM> Install-Package Senparc.Weixin.Open

How to use distributed cache?

Senparc. Weixin SDK provides the perfect caching policy interface, use the default native cache implementation, it also provides a Redis and Memcached expansion plans, you can also add your own caching strategies according to the same rules.

PM> Install-Package Senparc.Weixin.Senparc.Weixin.Cache.Redis
PM> Install-Package Senparc.Weixin.Senparc.Weixin.Cache.Memcached

How to develop Mini Program?

The back-end architecture of the mini program is highly consistent with the Official Account, Only use the Nuget installationSenparc.Weixin.WxOpen to start your Mini Program develop.

Senparc.Weixin.WxOpen currently contains all the information processing, AccessToken management, template message, QR code generation, etc.

Welcome developers to Pull Request for modules that are not completed or need to be added.

Branch Description

 Branch       Description        
master   Officially published main branch, usually this branch is stable, can be used in production environment.
Developer 1, development branch, the branch for the Beta version, usually we submit the new version to this branch first, the stable version will push to the master branch. If you want to sneak peek in new function, you can use this branch.
2, this branch is compatible with the.net 4.5 /.net core /.net core 2.0 version, and it is recommended that Pull Request to this branch, not master

| BookVersion1 | this branch is code snapshot for book Depth Analysis of WeChat Development . | DotNET-Core_MySQL | this branch shows the integration with Pomelo.EntityFrameworkCore.MySql in .NET Core environment. | NET4.0     | Support for .Net 4.0 only, this branch has stopped updating in 2017. The latest code of .Net 4.0 is updated with the master/Developer branch

| NET3.5     | Support for.Net 3.5 only, which stopped updating in 2015. The latest code is updated with the master/Developer branch | Developer-Senparc.SDK | This branch is used only for the Senparc team internal test, you can ignore this one.

Thanks for Contributors

Thanks to the developers who have contributed to this project, you have not only perfected this project, but also made a contribution to Open Source Enterprise. Thank you! Click Here to see the list.

Donate

If this project is useful to you, we welcome any form of contributions, including participation in project code updates or feedback.Thank you!

Donate:

donate

Stargazers over time

starcharts stargazers over time

License

Apache License Version 2.0

Copyright 2021 Jeffrey Su & Suzhou Senparc Network Technology Co.,Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file 
except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the 
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
either express or implied. See the License for the specific language governing permissions 
and limitations under the License.

Detail: https://github.com/JeffreySu/WeiXinMPSDK/blob/master/license.md

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

微信公众平台SDK Senparc.Weixin for C#,支持.NET Framework及.NET Core。已支持微信公众号、小程序、小游戏、企业号、企业微信、开放平台、微信支付、JSSDK、微信周边等全平台。 WeChat SDK for C#. expand collapse
C#
Apache-2.0
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
C#
1
https://gitee.com/winshow_chen/WeiXinMPSDK.git
git@gitee.com:winshow_chen/WeiXinMPSDK.git
winshow_chen
WeiXinMPSDK
WeiXinMPSDK
master

Search