PHPackages                             fushengfu/wechat - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. fushengfu/wechat

ActiveLibrary[API Development](/categories/api)

fushengfu/wechat
================

v1.5(3y ago)018[1 issues](https://github.com/Fushengfu/wechat/issues)MITPHP

Since Jan 8Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Fushengfu/wechat)[ Packagist](https://packagist.org/packages/fushengfu/wechat)[ RSS](/packages/fushengfu-wechat/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

SDK使用说明
=======

[](#sdk使用说明)

安装
--

[](#安装)

```
composer require fushengfu/wechat

```

使用示例
----

[](#使用示例)

### 1、引入命名空间工厂类

[](#1引入命名空间工厂类)

```
use Fushengfu\Wechat\Factory;

```

### 2、代码示例

[](#2代码示例)

```

/**
 * $object work： 企业微信 officialAccount： 公众号 pay： 微信支付 applet：小程序
 *
 */
$app = Factory::make($object, $options);

$app = Factory::make("work", [
  'corpid'=> '*******',//企业微信服务商ID
  'providerSecret'=> '3******',//企业微信服务商secret
  'baseUrl'=> 'http://******',//基础链接
  'suiteId'=>'*******',//企业微信第三方应用ID
  'suiteSecret'=>'******',//企业微信第三方应用secret
  'appid'=> '******',//企业微信 企业corpid
  'suiteTicket'=> '****',//企业微信第三方应用 ticket
  'permanentCode'=> '*****'//企业微信第三方应用授权永久授权码
]);

```

公众号
---

[](#公众号)

```
/**
 * $object work： 企业微信 officialAccount： 公众号 pay： 微信支付 applet：小程序
 *
 */
$app = Factory::make($object, $options);

$app = Factory::make("officialAccount", [
  'appid'=> '*******',//公众号appID
  'secret'=> '3******',//公众号secret
]);

```

### 接口调用示例

[](#接口调用示例)

```
//返回接口响应的原始数据
$response = $app->contactBatchSearch([
  'query_word'=> '南山南'
]);

//返回数组
$arrayResponse = $app->toArray();

//返回 200 网络请求正常
$statusCode = $app->getStatusCode();

//返回 0 则接口响应正常
$errCode = $app->getErrmsg();

//返回true 则请求成功
$ok = $app->Ok();

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance47

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Recently: every ~26 days

Total

6

Last Release

1113d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3fdaa64ebd5916452d85d3a93d51d5d296c0a93c19f3b7420b969fe7376fa751?d=identicon)[Fushengfu](/maintainers/Fushengfu)

---

Top Contributors

[![Fushengfu](https://avatars.githubusercontent.com/u/15023381?v=4)](https://github.com/Fushengfu "Fushengfu (16 commits)")

### Embed Badge

![Health badge](/badges/fushengfu-wechat/health.svg)

```
[![Health](https://phpackages.com/badges/fushengfu-wechat/health.svg)](https://phpackages.com/packages/fushengfu-wechat)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
