explaingit

w7corp/easywechat

10,377PHPAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

EasyWeChat is a PHP library that wraps WeChat's developer APIs, Official Accounts, Mini Programs, and payments, into a simple, PHP-friendly interface so you skip the raw HTTP and signature juggling.

Mindmap

mindmap
  root((repo))
    What it does
      Wraps WeChat APIs
      PHP-friendly interface
    WeChat products
      Official Accounts
      Mini Programs
      WeChat Pay
    Tech stack
      PHP 8.4
      Composer
    Setup
      Install via Composer
      WeChat credentials
      Config object
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a WeChat Official Account bot in PHP that automatically responds to user messages with custom replies.

USE CASE 2

Integrate WeChat Pay into a PHP e-commerce site using EasyWeChat's payment API wrapper.

USE CASE 3

Create a WeChat Mini Program backend in PHP that handles user authentication and API calls.

Tech stack

PHPComposer

Getting it running

Difficulty · moderate Time to first run · 30min

Requires PHP 8.4+, a WeChat developer account, and credentials (app ID, secret, token) from the WeChat developer console.

Use, copy, modify, and distribute freely for any purpose, including commercial projects, as long as you keep the copyright notice.

In plain English

EasyWeChat is a PHP library for building applications on WeChat (also known as Weixin), the dominant messaging and social platform in China operated by Tencent. WeChat offers a developer platform with multiple product types: Official Accounts (which function like subscription channels or business pages), Mini Programs (lightweight apps that run inside WeChat), and payment and open-platform APIs. EasyWeChat wraps these APIs into a PHP-friendly interface so developers do not have to deal with raw HTTP requests, signature verification, and XML parsing themselves. The library is installed through Composer, PHP's standard package manager, using a single command. It requires PHP version 8.4 or newer. Once installed, you configure it with credentials from the WeChat developer console (app ID, secret key, and a token for verifying messages), then use the resulting object to handle incoming messages from users or call outbound WeChat APIs. The code example in the README shows a basic Official Account server setup that responds to any user message with a greeting. The full documentation, including guides for each WeChat product type, is available in Chinese and English at easywechat.com. The project is maintained by w7corp, the open-source arm of a Chinese SaaS platform called Weijin (微擎). It is released under the MIT license and accepts community contributions through GitHub.

Copy-paste prompts

Prompt 1
Using EasyWeChat, write PHP code to set up a WeChat Official Account server that replies with a greeting to every incoming message.
Prompt 2
Show me how to configure EasyWeChat for WeChat Pay and process a payment request from a PHP script.
Prompt 3
How do I use EasyWeChat to send a template message to my WeChat Official Account followers from PHP?
Open on GitHub → Explain another repo

← w7corp on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.