PHPackages                             min-radish/php-wechat-pay - 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. min-radish/php-wechat-pay

ActiveLibrary[API Development](/categories/api)

min-radish/php-wechat-pay
=========================

PHP对微信支付API的调用

v2.0(5y ago)125MITPHPPHP &gt;=5.0.0

Since Apr 16Pushed 5y agoCompare

[ Source](https://github.com/PerfectMM/radish-php-wechat-pay)[ Packagist](https://packagist.org/packages/min-radish/php-wechat-pay)[ RSS](/packages/min-radish-php-wechat-pay/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

微信支付
====

[](#微信支付)

*需自定义一个类并继承 Radish\\WeChatPay\\WeChatPay重写构造函数进行相关配置*

*自定义相关参数保存调用接口凭证*

**public function cacheGet($key, $default = false);**

**public function cacheSet($key, $val, $timeout = 7140);**

api示例说明
-------

[](#api示例说明)

```
    $wechatPay = new WeChatPay();
    $wechatPay->sendRedPackent($options)

```

**options 示例**

```
    $mchbillno = $wechatPay->orderNo('建议相关表ID | 也可不传');
    $params = [
        'mch_billno' => $mchbillno,//'商户订单号（每个订单号必须唯一。取值范围：0~9，a~z，A~Z接口根据商户订单号支持重入，如出现超时可再调用。'
        'send_name' => 'Radish',//'商户名称 红包发送者名称  注意：敏感词会被转义成字符*'
        'open_id' => open_id,//'open_id 微信号在微信公众号唯一标识'
        'total_amount' => 0.5 * 100,//'付款金额，单位分'
        'wishing' => '',//'红包祝福语注意：敏感词会被转义成字符*'
        'act_name' => '',//'活动名称注意：敏感词会被转义成字符*'
        'remark' => '',//'备注信息'
        'scene_id' => '',//'场景id发放红包使用场景，红包金额大于200或者小于1元时必传'
    ];

```

配置相关
====

[](#配置相关)

```
根据个人仍情况整理
[
    'appId' => '微信公众号APPID',
    'appSecret' => '微信公众号APPSECRET',
    'pay' => [
        'mchId' => '商户号',
        'key' => '商户秘钥',
        'serverIp' => '服务器IP',
        'apiclientCert' => 证书路径,
        'apiclientKey' => 证书路径,
    ],
];

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

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

Total

5

Last Release

2188d ago

Major Versions

v1.0.6 → v2.02020-05-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/354ed9bfa439a57b040570fe37efa954208038eeb19a3e8f5906498ca07d1d62?d=identicon)[PerfectMM](/maintainers/PerfectMM)

---

Top Contributors

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

---

Tags

payphpwechat-payphpapipaywechat

### Embed Badge

![Health badge](/badges/min-radish-php-wechat-pay/health.svg)

```
[![Health](https://phpackages.com/badges/min-radish-php-wechat-pay/health.svg)](https://phpackages.com/packages/min-radish-php-wechat-pay)
```

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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