PHPackages                             nece001/php-brawl-payment-weixin - 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. nece001/php-brawl-payment-weixin

ActiveLibrary[Payment Processing](/categories/payments)

nece001/php-brawl-payment-weixin
================================

php 微信支付基础服务项目

10PHP

Since Jul 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/nece001/php-brawl-payment-weixin)[ Packagist](https://packagist.org/packages/nece001/php-brawl-payment-weixin)[ RSS](/packages/nece001-php-brawl-payment-weixin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-brawl-payment-weixin
========================

[](#php-brawl-payment-weixin)

PHP 微信支付基础服务适配项目

依赖
==

[](#依赖)

composer require "wechatpay/wechatpay": "^1.4"

示例
==

[](#示例)

```
    $conf = array(
        'pay_notify_url' => '支付通知回调地址',
        'refund_notify_url' => '退款通知回调地址',
        'version' => 'APIv3',
        'mchid' => '商户号',
        'secret_key' => 'APIv3/APIv2密钥',
        'apiclient_cert_pem' => '证书文件路径',
        'apiclient_key_pem' => '证书密钥文件路径',
        'serial' => '序列号',
        'platform_cert_pem' => '平台证书文件路径',
        // 'http_proxy' => 'http代理',
        // 'https_proxy' => 'https代理',
    );

    // 创建配置
    $config = Factory::createConfig('Weixin');
    // print_r($config->getTemplate());exit;
    $config->setConfig($conf);

    // 创建客户端
    $payment = Factory::createClient($config);

    try {
        // -------------------------
        // 支付
        // -------------------------
        // $params = new Jsapi();
        // $params->setAppId('wxef6df151e6d8442e');
        // $params->setPayer('oM77J4q6hdfNynqtqIbDek6g8cmc');
        // $params->setAmount(1);
        // $params->setOutTradeNo('PY' . StringUtil::randNum(20)); // 'PY' . StringUtil::randNum(20)
        // $params->setTimeExpire();
        // $params->setDescription('测试商品');

        // $result = $payment->prepay($params);
        echo '发送结果：', '';
        print_r($result);

        echo '返回结果：' . $payment->getRawRespnose();
    } catch (Throwable $e) {
        echo '异常消息：' . $e->getMessage(), '';
        echo '错误信息：' . $payment->getErrorMessage();
    }
```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7ea7520d9628437f3c5710adefc9f92fc7b6cde28108441b5c3e216f400c497?d=identicon)[nece001](/maintainers/nece001)

---

Top Contributors

[![nece001](https://avatars.githubusercontent.com/u/3203603?v=4)](https://github.com/nece001 "nece001 (15 commits)")

### Embed Badge

![Health badge](/badges/nece001-php-brawl-payment-weixin/health.svg)

```
[![Health](https://phpackages.com/badges/nece001-php-brawl-payment-weixin/health.svg)](https://phpackages.com/packages/nece001-php-brawl-payment-weixin)
```

###  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)
