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

ActiveLibrary[Payment Processing](/categories/payments)

siganushka/alipay-api
=====================

Alipay API.

1.1.0(5mo ago)0220↓50%1MITPHPPHP &gt;=8.1CI passing

Since Sep 5Pushed 2mo ago1 watchersCompare

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

READMEChangelog (2)Dependencies (3)Versions (4)Used By (1)

Alipay API
==========

[](#alipay-api)

支付宝支付相关接口实现，基于 [siganushka/api-factory](https://github.com/siganushka/api-factory) 抽象层，可快速实现业务。

### 安装

[](#安装)

```
$ composer require siganushka/alipay-api
```

### 使用

[](#使用)

具体使用参考 `./example` 示例目录，运行示例前请复制 `_config.php.dist` 文件为 `_config.php` 并修改相关参数。

该目录包含以下示例：

文件功能example/query.php支付宝订单查询example/refund.php支付宝退款example/parameter\_utils.php生成支付宝支付参数example/signature\_uitls.php生成、验证支付签名example/page\_pay\_utils.php生成网站扫码支付参数example/notify.php支付异步通知### 框架集成

[](#框架集成)

`Symfony` 项目已集成至 [siganushka/api-factory-bundle](https://github.com/siganushka/api-factory-bundle)，将以服务的形式使用。

安装

```
$ composer require siganushka/alipay-api siganushka/api-factory-bundle
```

配置

```
# config/packages/siganushka_api_factory.yaml

siganushka_api_factory:
    alipay:
        appid: your_appid                       # 应用 ID
        app_private_key: app_private_key        # 应用私钥（注意是应用的私钥）
        alipay_public_key: alipay_public_key    # 支付宝公钥（注意是支付宝的公钥）
```

使用

```
// src/Controller/DefaultController.php

use Siganushka\ApiFactory\Alipay\ParameterUtils;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class DefaultController extends AbstractController
{
    public function index(ParameterUtils $utils)
    {
        $options = [
            'subject' => 'APP 支付测试订单',
            'out_trade_no' => uniqid(),
            'total_amount' => '0.01',
        ];

        $parameter = $utils->app($options);
        var_dump($parameter);
    }
}
```

查看所有服务

```
$ php bin/console debug:container Siganushka\\ApiFactory\\Alipay
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance80

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

Total

2

Last Release

151d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.4

1.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fd8a914f7aa732b7bf15b7b4aacfed35e24dbdc5e278a5f4f047c6f85e383ec?d=identicon)[siganushka](/maintainers/siganushka)

---

Top Contributors

[![siganushka](https://avatars.githubusercontent.com/u/45844370?v=4)](https://github.com/siganushka "siganushka (45 commits)")

---

Tags

alipay-api

### Embed Badge

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

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

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)

PHPackages © 2026

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