PHPackages                             siganushka/wxpay-api - 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. siganushka/wxpay-api

ActiveLibrary[Payment Processing](/categories/payments)

siganushka/wxpay-api
====================

Wxpay API.

1.1.0(5mo ago)0222↓50%1MITPHPPHP &gt;=8.1CI passing

Since Sep 5Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/siganushka/wxpay-api)[ Packagist](https://packagist.org/packages/siganushka/wxpay-api)[ Docs](https://github.com/siganushka/wxpay-api)[ RSS](/packages/siganushka-wxpay-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (4)Used By (1)

Wxpay API
=========

[](#wxpay-api)

微信支付相关接口实现。基于 [siganushka/api-factory](https://github.com/siganushka/api-factory) 抽象层，可快速实现微信支付相关业务。

### 安装

[](#安装)

```
$ composer require siganushka/wxpay-api
```

### 使用

[](#使用)

具体使用参考 `./example` 示例目录，运行示例前请复制 `_config.php.dist` 文件为 `_config.php` 并修改相关参数。

该目录包含以下示例：

文件功能example/unifiedorder.php微信支付统一下单example/query.php微信支付查询订单example/refund.php微信支付退款example/transfer.php微信支付付款到零钱example/parameter\_utils.php生成微信支付参数example/signature\_uitls.php生成、验证支付签名example/notify.php微信支付异步通知### 框架集成

[](#框架集成)

`Symfony` 项目已集成至 [siganushka/api-factory-bundle](https://github.com/siganushka/api-factory-bundle)，将以服务的形式使用。

安装

```
$ composer require siganushka/wxpay-api siganushka/api-factory-bundle
```

配置

```
# config/packages/siganushka_api_factory.yaml

siganushka_api_factory:
    wxpay:
        appid: your_appid                   # 微信支付绑定的应用帐号
        mchid: your_mchid                   # 微信支付商户号
        mchkey: your_mchkey                 # 微信支付商户密钥
        mch_client_cert: your_client_cert   # 微信支付商户客户端证书 Cert（选填）
        mch_client_key: your_client_key     # 微信支付商户客户端证书 Key（选填）
```

使用

```
// src/Controller/DefaultController.php

use Siganushka\ApiFactory\Wxpay\Unifiedorder;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class DefaultController extends AbstractController
{
    public function index(Unifiedorder $request)
    {
        $options = [
            'body' => '统一下单测试订单',
            'notify_url' => 'http://localhost',
            'out_trade_no' => uniqid(),
            'total_fee' => 1,
            'trade_type' => 'APP',
        ];

        $result = $request->send($options);
        var_dump($result);
    }
}
```

查看所有可用服务

```
$ php bin/console debug:container Siganushka\\ApiFactory\\Wxpay
```

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance86

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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 ~210 days

Total

2

Last Release

151d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.4

1.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fd8a914f7aa732b7bf15b7b4aacfed35e24dbdc5e278a5f4f047c6f85e383ec?d=identicon)[siganushka](/maintainers/siganushka)

---

Top Contributors

[![siganushka](https://avatars.githubusercontent.com/u/45844370?v=4)](https://github.com/siganushka "siganushka (34 commits)")

---

Tags

wxpay-api

### Embed Badge

![Health badge](/badges/siganushka-wxpay-api/health.svg)

```
[![Health](https://phpackages.com/badges/siganushka-wxpay-api/health.svg)](https://phpackages.com/packages/siganushka-wxpay-api)
```

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[mews/pos

Türk bankaları için sanal pos kütüphanesi

32414.6k1](/packages/mews-pos)[bitbag/sylius-adyen-plugin

BitBag Adyen plug-in for Sylius.

1249.9k](/packages/bitbag-sylius-adyen-plugin)

PHPackages © 2026

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