PHPackages                             zhan3333/payment - 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. zhan3333/payment

ActiveLibrary

zhan3333/payment
================

集成支付宝、微信支付等流行的支付接口，后续会持续跟进中

v2.7.4(9y ago)08MITPHPPHP &gt;=5.6

Since Jun 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/zhan3333/payment)[ Packagist](https://packagist.org/packages/zhan3333/payment)[ Docs](https://helei112g.github.io/)[ RSS](/packages/zhan3333-payment/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (19)Used By (0)

[![Software license](https://camo.githubusercontent.com/3b83d6d1b3b377ba8f41c1e4ac197ad0dc056a760ec10c1f6484aa7b617fcc5a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f68656c6569313132672f7061796d656e742e737667)](LICENSE)[![Latest development](https://camo.githubusercontent.com/fbd0d64a834c65c0454f037d9012c00c63a4c836819b10a576b9273deac8923d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f7269766572736c65692f7061796d656e742e737667)](https://packagist.org/packages/riverslei/payment)[![Monthly installs](https://camo.githubusercontent.com/3535208b5d71d3a0168e83449a3dcc2e05763097b6efa38a72cbe8a864048c10/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f7269766572736c65692f7061796d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/riverslei/payment/stats)

---

Payment 能够做什么
=============

[](#payment-能够做什么)

Paymeng 主要帮助 php 开发者在服务端快速接入主流的支付平台(支付宝支付、微信支付等)。节省时间少走弯路。

Payment 针对不同支付平台，提供了统一的调用方式，开发者无需再一个平台一个平台的去阅读文档、调试。所有的支付平台后台服务统一用一套代码，在支付对接模块的代码维护量大大减少，可以把更多的时间和精力花在自身产品的核心业务上

### 为什么要用Payment SDK

[](#为什么要用payment-sdk)

所有的支付官方都提供了demo，方便开发者学习使用。但是其中每一个支付 demo 都不尽相同，并且不少 官方 demo 还有不少错误，让开发者使用的时候莫名其妙。

针对不同的支付，官方demo写法各异，很多还使用了老旧的 php 语法。

而 **Payment SDK** 针对不同服务商的支付功能，都提供统一的调用方式，大大降低学习与使用成本。

### 与其他聚合支付服务的对比

[](#与其他聚合支付服务的对比)

这里最主要的对比对象是ping++。当然我这个个人开发者肯定没法与之相比。首先ping++服务更多，接入的支付种类更多。开放出来的接口也更多。

但是本sdk的优势也非常明显。

- 使用项目自己部署，只需向第三方支付服务提供者付费（阿里、腾讯）。
- 项目开源，遵循 **MIT** 许可证，大家可自由更改。
- 根据自己需求，可以自己动手定义个性化。
- 通过composer安装管理，方便升级。
- 就算我以后不维护升级了，也保证你代码可用，如果用第三方聚合的支付，与第三方就有了强关联。

### 其他

[](#其他)

开发者只需要专注自己的业务，对于主流支付方式本sdk会持续集成

*招商一网通支付 正在开发中... ...*

更多详细情况请[点击这里](https://helei112g.github.io/categories/payment/)

由于 `payment v1` 版本在设计开发时的缺陷，不在进行维护升级。并且 `v2` 版本也不与之兼容。建议大家都升级v2版本

重要变更
----

[](#重要变更)

- 支持支付宝新版本支付接口（from v2.7.0）
- 配置文件控制权限由使用者控制（from v2.0.0）

安装与使用Payment
------------

[](#安装与使用payment)

推荐大家通过composer来进行安装。

- 方式一

通过composer，这是推荐的方式，可以使用composer.json 声明依赖，或者运行下面的命令。SDK 包已经放到这里 riverslei/payment

```
    composer require "riverslei/payment:~2.0"
```

放入composer.json文件中

```
    "require": {
        "riverslei/payment": "~2.0"
    }
```

- 方式二 直接下载安装，SDK 没有依赖其他第三方库，但需要参照 composer的autoloader，增加一个自己的autoloader程序。

代码中以提供一个默认autolaod.php 可直接使用.

**Payment v2.x**需要 PHP &gt;= 5.6，并且需要安装以下扩展：

- cURL extension
- mbstring

**Payment v1.x**需要 PHP &gt;= 5.3 , 并且需要安装以下扩展：

- cURL extension

Payment SDK使用文档[请看这里](https://helei112g.github.io/categories/payment/)

联系&amp;打赏
---------

[](#联系打赏)

如果真心觉得项目帮助到你，为你节省了成本，欢迎鼓励一下。

如果有什么问题，可通过以下方式联系我。提供有偿技术服务。

也希望更多朋友可用提供代码支持。欢迎交流与大赏。

**邮箱**：

**不错，我要鼓励一下**

[![image](https://camo.githubusercontent.com/78f607921486c993b1d1288b5b8f5eafe8e87c6fa90c0eaf032cb47322f367c4/687474703a2f2f6f6c35396e717231692e626b742e636c6f7564646e2e636f6d2f616c692d77782d7061792e6a70673f696d61676556696577322f322f772f353030)](https://camo.githubusercontent.com/78f607921486c993b1d1288b5b8f5eafe8e87c6fa90c0eaf032cb47322f367c4/687474703a2f2f6f6c35396e717231692e626b742e636c6f7564646e2e636f6d2f616c692d77782d7061792e6a70673f696d61676556696577322f322f772f353030)

**打赏名单**

名字金额说明时间彦88感觉还不错，特打赏88元，略表感谢。2017-02-28汤明洋66.66支持一下2017-02-19李仕建同学18.88新春快乐2017-02-09凡额50.00帮助调试，谢谢了2017-01-18Thans秦66.66商业使用2017-01-08John10.00设计很棒2017-01-06Davidw699.00支持开发2.02016-12-15宁静致远10.00鼓励你，加油额2016-12-13k78.00批量付款，一次成功2016-11-24洋50.00资助开源2016-11-23张仲东50.00接口封装的不错2016-11-17放下...快乐1000.00支付宝即时到帐处理2016-11-15Robin Core Animation50.00解决微信支付问题2016-11-045Z420.00解决回调问题2016-10-31哈罗Joe1.00加油~~2016-8-23小兵~招UI前端50.00继续努力,喝杯水吧:-)2016-8-14尊称韦爵爷1.00赶紧出个yii的扩展2016-7-22一米市集1000.00希望提供技术长期合作2016-7-20张松15.00不错，已用到项目中2016-6-17### License

[](#license)

The code for Payment is distributed under the terms of the MIT license (see [LICENSE](LICENSE)).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

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

Total

16

Last Release

3359d ago

Major Versions

v1.2 → v2.02016-07-27

PHP version history (3 changes)v1.0PHP &gt;=5.5

v1.2PHP &gt;=5.4

v2.7.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f1fc4b7abc91376754a4da3afc7007aa8aefef41c6995fe69eeb972adef2ad0?d=identicon)[zhan3333](/maintainers/zhan3333)

---

Top Contributors

[![helei112g](https://avatars.githubusercontent.com/u/10877127?v=4)](https://github.com/helei112g "helei112g (59 commits)")

---

Tags

sdkalipayweixin

### Embed Badge

![Health badge](/badges/zhan3333-payment/health.svg)

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

###  Alternatives

[riverslei/payment

支付宝支付、微信支付、招商一网通支付php SDK。方便快速接入，最完整的开源支付 php sdk

2.4k155.5k2](/packages/riverslei-payment)

PHPackages © 2026

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