PHPackages                             tinymeng/alipay-sdk - 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. tinymeng/alipay-sdk

ActiveLibrary[Payment Processing](/categories/payments)

tinymeng/alipay-sdk
===================

支付宝开放平台第三方 PHP SDK，基于官方最新版本，支持公钥和公钥证书2种模式。

v1.1.0(2y ago)021MITPHPPHP &gt;=7.1

Since May 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/majiameng/alipay-sdk-php)[ Packagist](https://packagist.org/packages/tinymeng/alipay-sdk)[ RSS](/packages/tinymeng-alipay-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Alipay SDK for PHP
==================

[](#alipay-sdk-for-php)

支付宝开放平台第三方 PHP SDK，基于官方最新版本，支持公钥和公钥证书2种模式。

### 功能特点

[](#功能特点)

- 根据支付宝开放平台最新API开发，相比官方SDK，功能更完善，代码更简洁
- 支持支付宝服务商模式与互联网平台直付通模式
- 支持Composer安装，无需加载多余组件，可应用于任何平台或框架
- 符合`PSR`标准，你可以各种方便的与你的框架集成
- 基本完善的PHPDoc，可以随心所欲添加本项目中没有的API接口

### 环境要求

[](#环境要求)

`PHP` &gt;= 7.1

### 使用方法

[](#使用方法)

1. Composer 安装。

```
composer require tinymeng/alipay-sdk -vvv
```

> 类库使用的命名空间为`\\tinymeng\\Alipay`

2. 创建配置文件 [`config.php`](./examples/config.php)，填写配置信息。
3. 引入配置文件，构造请求参数，调用AlipayTradeService中的方法发起请求，参考 [`examples/qrpay.php`](./examples/qrpay.php)
4. 更多实例，请移步 [`examples`](examples/) 目录。
5. AlipayService实现类功能说明

    类名说明AlipayTradeService支付宝交易功能，基本上所有支付产品都用这个AlipayOauthService支付宝快捷登录功能，用于JS支付快捷登录以及第三方应用授权AlipaySettleService支付宝分账功能AlipayTransferService支付宝转账功能AlipayComplainService支付宝交易投诉处理AlipayCertifyService支付宝身份认证AlipayCertdocService支付宝实名证件信息比对验证AlipayBillService支付宝账单功能
6. 要对接的API在AlipayService实现类中没有，可根据支付宝官方的文档，使用AlipayService类中的aopExecute方法直接调用接口，参考 [`examples/other.php`](./examples/other.php)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

Total

2

Last Release

1088d ago

### Community

Maintainers

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

---

Top Contributors

[![majiameng](https://avatars.githubusercontent.com/u/24783993?v=4)](https://github.com/majiameng "majiameng (7 commits)")

---

Tags

alipay

### Embed Badge

![Health badge](/badges/tinymeng-alipay-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/tinymeng-alipay-sdk/health.svg)](https://phpackages.com/packages/tinymeng-alipay-sdk)
```

###  Alternatives

[yansongda/pay

可能是我用过的最优雅的 Alipay 和 WeChat 的支付 SDK 扩展包了

5.3k1.2M53](/packages/yansongda-pay)[yansongda/laravel-pay

专注 Alipay/WeChat/Unipay 的 laravel 支付扩展包

1.1k353.2k9](/packages/yansongda-laravel-pay)[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

587421.0k11](/packages/lokielse-omnipay-alipay)[latrell/alipay

支付宝SDK在Laravel5封装包。

40349.2k](/packages/latrell-alipay)[yansongda/hyperf-pay

可能是基于 hyperf 的最优雅的支付宝、微信、银联支付 SDK 了

8959.8k1](/packages/yansongda-hyperf-pay)[lokielse/omnipay-global-alipay

Alipay global gateway for Omnipay payment processing library

3048.9k](/packages/lokielse-omnipay-global-alipay)

PHPackages © 2026

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