PHPackages                             djlin/wechatpayapi - 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. [Payment Processing](/categories/payments)
4. /
5. djlin/wechatpayapi

ActiveLibrary[Payment Processing](/categories/payments)

djlin/wechatpayapi
==================

微信支付api

1.2(7y ago)018PHPPHP &gt;=5.3.0

Since Jan 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/dongjialin/Wechatpayapi)[ Packagist](https://packagist.org/packages/djlin/wechatpayapi)[ RSS](/packages/djlin-wechatpayapi/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

微信支付简单集成
========

[](#微信支付简单集成)

```
require __DIR__ . '/vendor/autoload.php';
use Wechatpayapi\Wechatpay;
$mp = array(
    'appid'=>'',//微信appid
    'mch_id'=>'',//商户号
    'key'=>'',//key
);
$w = new Wechatpay($mp);

$data = array(
    'body' => '商品描述',
    'out_trade_no' => '订单号',
    'total_fee' => '金额（分）',
    'notify_url' => '回调地址',
);
$res = $w->wechatAppPay($data);

```

- wechatAppPay APP支付
- wechatXiaoPay 小程序支付
- jsapipay JSAPI支付
- htmlpay H5支付

```
//查询订单
$data = array(
    'out_trade_no' => '订单号',
);
$res = $w->wechatOrderresult($data);

```

- wechatCloseOrder 关闭订单
- 持续更新中。。。

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.7% 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

Unknown

Total

1

Last Release

2675d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/639527007f36f42ed068af93a93ad687076d4c386f3166ff361a87f7a0a97333?d=identicon)[dongjialin](/maintainers/dongjialin)

---

Top Contributors

[![dongjialin](https://avatars.githubusercontent.com/u/15190078?v=4)](https://github.com/dongjialin "dongjialin (23 commits)")[![RebekahAdmin](https://avatars.githubusercontent.com/u/25978454?v=4)](https://github.com/RebekahAdmin "RebekahAdmin (10 commits)")

### Embed Badge

![Health badge](/badges/djlin-wechatpayapi/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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