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

ActiveSymfony-bundle[Payment Processing](/categories/payments)

orinoco/alipay-bundle
=====================

Symfony bundle wrapper for Alipay SDK and demo library. 把阿里支付 SDK 和 demo 库包装为 Symfony Bundle.

1.0.2(8y ago)111MITPHP

Since Feb 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Hailong/AlipayBundle)[ Packagist](https://packagist.org/packages/orinoco/alipay-bundle)[ Docs](https://github.com/Hailong/AlipayBundle)[ RSS](/packages/orinoco-alipay-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)DependenciesVersions (3)Used By (0)

AlipayBundle
============

[](#alipaybundle)

Symfony bundle wrapper for Alipay SDK and demo library.

把阿里支付 SDK 和 demo 库包装为 Symfony Bundle.

### Parts of this bundle / 这个 bundle 的组成

[](#parts-of-this-bundle--这个-bundle-的组成)

1. The `AlipayBundle` folder / `AlipayBundle` 目录

    This is the Symfony bundle code to define the configs required by this bundle and to instantiate the service instances to use Alipay SDK.

    这里是 Symfony bundle 的代码，定义了所需的配置信息以及构建用于调用 Alipay SDK 的服务对象的代码。
2. The `AlipaySDK` folder / `AlipaySDK` 目录

    Here is the SDK and demo code downloaded from Alipay developer website.

    这里是从阿里支付开发人员站点下载的 SDK 代码以及官方的 demo 代码。

    Download path of the libraries / 代码的下载路径如下：

    > 服务端SDK `alipay-sdk-PHP-20180104135052`
    >
    > 电脑网站支付demo `alipay.trade.page.pay-PHP-UTF-8`
    >
    > 手机网站支付DEMO `alipay.trade.wap.pay-PHP-UTF-8`

### Why use the demo library / 为什么引用 demo 库

[](#why-use-the-demo-library--为什么引用-demo-库)

This underlying service instance that instantiated by the bundle is `AlipayTradeService.php` provided by the demo library by default. While you could define your own service to replace the default and give the class name through config.

默认情况下这个 bundle 底层实例化的类是 demo 库提供的 `AlipayTradeService.php`。然而你可以提供自己的类，然后在配置里面指定即可。

### Usage / 用法

[](#usage--用法)

Once the bundle been successfully loaded into your Symfony application, the following service instances would be ready to use:

在 Bundle 成功加载到你的 Symfony 应用程序之后，以下的2个服务对象就可以使用了：

- orinoco\_alipay.trade\_service.page
- orinoco\_alipay.trade\_service.wap

For example:

例如：

```
// in controller class
// 在 controller 类中使用
$this->get('orinoco_alipay.trade_service.page')
```

```

    ...

```

### Config / 配置

[](#config--配置)

```
# app/config/config.yml
orinoco_alipay:
    page_trade:
        class_name: AlipayTradeService
        gateway_url: '%alipay_gatewayUrl%'
        app_id: '%alipay_app_id%'
        rsa_private_key: '%alipay_rsa_private_key%'
        rsa_public_key: '%alipay_rsa_private_key%'
        charset: '%alipay_charset%'
        sign_type: '%alipay_sign_type%'
    wap_trade:
        class_name: AlipayTradeService
        gateway_url: '%alipay_gatewayUrl%'
        app_id: '%alipay_app_id%'
        rsa_private_key: '%alipay_rsa_private_key%'
        rsa_public_key: '%alipay_rsa_private_key%'
        charset: '%alipay_charset%'
        sign_type: '%alipay_sign_type%'
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Every ~1 days

Total

2

Last Release

3015d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c658c7b8cf6c3c9a537cb71a28b4a3ae9539933ee2950ca8d187cada2849572?d=identicon)[hailong](/maintainers/hailong)

---

Top Contributors

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

---

Tags

symfonysdkalipay

### Embed Badge

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

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

###  Alternatives

[riverslei/payment

支付宝支付、微信支付、招商一网通支付php SDK。方便快速接入，最完整的开源支付 php sdk

2.4k155.5k1](/packages/riverslei-payment)

PHPackages © 2026

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