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

ActiveLibrary

ikerlin/alipay
==============

alipay OAuth2 Provider for Laravel Socialite

1.0.0(7y ago)1328[1 issues](https://github.com/ikerlin/alipay/issues)MITPHPPHP ^5.6 || ^7.0

Since Jun 15Pushed 7y ago1 watchersCompare

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

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

Alipay
======

[](#alipay)

支付宝生活号 OAuth2 账号连接 for Laravel 5.x.

Installation
------------

[](#installation)

1. 安装 composer package:

    ```
     composer require ikerlin/alipay

    ```
2. config/app.php 中 `Laravel\Socialite\SocialiteServiceProvider` 替换成 `SocialiteProviders\Manager\ServiceProvider`
3. `app/Providers/EventServiceProvider.php` 中添加一个监听器：`SocialiteProviders\Manager\SocialiteWasCalled`，如果已存在则忽略；并添加监听响应事件：`Ikerlin\Alipay\AlipayExtendSocialite@handle`

    ```
    'SocialiteProviders\Manager\SocialiteWasCalled' => [
        // ...
        'Ikerlin\Alipay\AlipayExtendSocialite@handle',
    ],

    ```
4. config/service.php 中添加一个配置项：

    ```
    'alipay' => [
        'client_id'     => env('ALIPAY_KEY'),
        'client_secret' => env('ALIPAY_SECRET'), //未使用参数，但不可移除
        'privateKeyFilePath' => env('ALIPAY_PRIVATE_KEY_FILE_PATH'), //相对于storage目录
        'publicKeyFilePath' => env('ALIPAY_PUBLIC_KEY_FILE_PATH'), //相对于storage目录
        'redirect'      => env('ALIPAY_REDIRECT_URL'),
    ],

    ```

Usage
-----

[](#usage)

详见官方文档 [socialite](http://laravel.com/docs/5.5/authentication#social-authentication) 用法。

[SocialiteProviders](https://github.com/SocialiteProviders)

License
-------

[](#license)

MIT License.

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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

2885d ago

### Community

Maintainers

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

### Embed Badge

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

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

###  Alternatives

[socialiteproviders/microsoft

Microsoft OAuth2 Provider for Laravel Socialite

326.1M13](/packages/socialiteproviders-microsoft)[socialiteproviders/apple

Apple OAuth2 Provider for Laravel Socialite

618.4M8](/packages/socialiteproviders-apple)[socialiteproviders/instagram

Instagram OAuth2 Provider for Laravel Socialite

421.9M5](/packages/socialiteproviders-instagram)[socialiteproviders/microsoft-azure

Microsoft Azure OAuth2 Provider for Laravel Socialite

556.0M19](/packages/socialiteproviders-microsoft-azure)[socialiteproviders/laravelpassport

LaravelPassport OAuth2 Provider for Laravel Socialite

621.3M7](/packages/socialiteproviders-laravelpassport)[socialiteproviders/discord

Discord OAuth2 Provider for Laravel Socialite

422.0M17](/packages/socialiteproviders-discord)

PHPackages © 2026

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