PHPackages                             rxlisbest/weipay - 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. rxlisbest/weipay

ActiveLibrary[Payment Processing](/categories/payments)

rxlisbest/weipay
================

微信H5支付

1.0.2(7y ago)136MITPHP

Since Jun 4Pushed 7y ago1 watchersCompare

[ Source](https://github.com/rxlisbest/weipay)[ Packagist](https://packagist.org/packages/rxlisbest/weipay)[ RSS](/packages/rxlisbest-weipay/feed)WikiDiscussions master Synced 2d ago

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

weipay
======

[](#weipay)

1、微信H5支付

- 安装

```
composer require rxlisbest/weipay=~1.0.2

```

- 用法

```
use rxlisbest\weipay\H5;

$mchid = 'xxxxx'; // 微信支付商户号 PartnerID 通过微信支付商户资料审核后邮件发送
$appid = 'xxxxx'; // 微信支付申请对应的公众号的APPID
$appKey = 'xxxxx'; // 微信支付申请对应的公众号的APP Key
$apiKey = 'xxxxx'; // https://pay.weixin.qq.com 帐户设置-安全设置-API安全-API密钥-设置API密钥
$outTradeNo = uniqid(); // 你自己的商品订单号
$payAmount = 0.01; // 付款金额，单位:元
$orderName = '支付测试'; // 订单标题
$notifyUrl = 'http://www.xxx.com/wx/notify.php'; // 付款成功后的回调地址(不要有问号)
$wapUrl = 'www.xxx.com'; // WAP网站URL地址
$wapName = 'H5支付'; // WAP 网站名

/** 配置结束 */
$wxPay = new H5($mchid, $appid, $apiKey);
$wxPay->setTotalFee($payAmount);
$wxPay->setOutTradeNo($outTradeNo);
$wxPay->setOrderName($orderName);
$wxPay->setNotifyUrl($notifyUrl);
$wxPay->setWapUrl($wapUrl);
$wxPay->setWapName($wapName);
$mwebUrl= $wxPay->createJsBizPackage();
$url = json_decode(json_encode($mwebUrl), true)[0];
$url .= '&redirect_url=' . urlencode('http://xxxxx'); // 支付成功后跳转
header('Location: ' . $url);

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Total

3

Last Release

2901d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62300e760338350c94e0b2d321deabf9145ca5969662dc95dc191a4ae402bf13?d=identicon)[rxlisbest](/maintainers/rxlisbest)

---

Top Contributors

[![rxlisbest](https://avatars.githubusercontent.com/u/4598303?v=4)](https://github.com/rxlisbest "rxlisbest (13 commits)")

### Embed Badge

![Health badge](/badges/rxlisbest-weipay/health.svg)

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

###  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/braintree

Braintree gateway for Omnipay payment processing library

35558.0k3](/packages/omnipay-braintree)

PHPackages © 2026

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