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

ActiveYii2-extension[Payment Processing](/categories/payments)

leyestd/yii2-alipay
===================

Yii framework alipay

8777PHP

Since Aug 29Pushed 10y ago5 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#yii2-alipay)

担保交易扩展

安装 composer require leyestd/yii2-alipay "dev-master"

配置 设置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

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![leyestd](https://avatars.githubusercontent.com/u/5299653?v=4)](https://github.com/leyestd "leyestd (1 commits)")

### Embed Badge

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

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

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

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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