PHPackages                             life2016/yii2-alipay - 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. life2016/yii2-alipay

ActiveLibrary[Payment Processing](/categories/payments)

life2016/yii2-alipay
====================

Yii framework alipay

1.0(10y ago)3372PHP

Since Jun 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ran1990/yii2-alipay)[ Packagist](https://packagist.org/packages/life2016/yii2-alipay)[ RSS](/packages/life2016-yii2-alipay/feed)WikiDiscussions master Synced 3w ago

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

yii2-alipay
===========

[](#yii2-alipay)

担保交易扩展

支付宝官方文档改编。。支持手机wap 及pc支付

安装 composer require life2016/yii2-alipay "\*"

配置 设置common/config/params.php

return \[ 'adminEmail' =&gt; '',

```
'supportEmail' => 'xxxxxxx@qq.com',

'user.passwordResetTokenExpire' => 3600,

'showUrl'=>'http://www.sasr.cn/index.php',

'notifyUrl' => 'http://www.sasr.cn/index.php/ali-return/notify',

'returnUrl' => 'http://www.sasr.cn/index.php/ali-return/returned',

'aliPartner' => 'xxxxxxxxxxxxx',

'aliSellerEmail' => 'xxxxxx@126.com',

'aliKey'=> 'xxxxxxxx'

```

\];

使用

use leyestd\\alipay\\Alipay;

use leyestd\\alipay\\lib\\AlipaySubmit;

//参数为支付宝所需,详细请看构造方法

$alipay=new Alipay($order-&gt;orderNumber, ltrim($productSkus),$cost,$order-&gt;notes,$show\_url,$recipient-&gt;name,$recipient-&gt;address,$recipient-&gt;postcode,$recipient-&gt;phone,$recipient-&gt;mobile);

$html\_text = (new AlipaySubmit($alipay-&gt;alipay\_config))-&gt;buildRequestForm($alipay-&gt;parameter, "get", "确认");

echo $html\_text;

支付宝支付后返回

$alipayNotify = new AlipayNotify((new Aliconfig)-&gt;getAliconfig());

$verify\_result = $alipayNotify-&gt;verifyReturn();

以下为支付宝支付后通知

$alipayNotify = new AlipayNotify((new Aliconfig)-&gt;getAliconfig());

$verify\_result = $alipayNotify-&gt;verifyNotify();

日志

默认在frontend/runtime/logs/alilog.txt 需要写入权限

也可自己修改AlipayCore下的logResult方法到指定位置

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3672d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/96126fb674e49c89c16c8f6cf2c0fca53197b35ed04a77bc0a7f1a942d32fafe?d=identicon)[ran](/maintainers/ran)

---

Top Contributors

[![ran1990](https://avatars.githubusercontent.com/u/18184629?v=4)](https://github.com/ran1990 "ran1990 (2 commits)")

### Embed Badge

![Health badge](/badges/life2016-yii2-alipay/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[guanguans/yii-pay

适配于 Yii 的 alipay 和 wechat 的支付扩展包

515.8k](/packages/guanguans-yii-pay)[hscstudio/yii2-cart

Yii2 extension that adds shopping cart functions

242.1k](/packages/hscstudio-yii2-cart)

PHPackages © 2026

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