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

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

grimmlink/alipay-bundle
=======================

GrimmlinkAlipayBundle

2.0(9y ago)21342MITPHPPHP &gt;=5.5.9

Since Mar 19Pushed 9y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

GrimmlinkAlipayBundle
=====================

[](#grimmlinkalipaybundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/9aafafb4e35b06398b386f9c3b15309224136eee6193db4c4c955db4a56f4fae/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f34383839626262342d323734622d343361352d626534322d6265313436323636353232322f6d696e692e706e67)](https://insight.sensiolabs.com/projects/4889bbb4-274b-43a5-be42-be1462665222)

A Symfony Bundle to help you create &amp; submit payment using Alipay's Cross-border Website Payment system ()

Requirements
------------

[](#requirements)

- cURL
- openssl

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

[](#installation)

Installation with composer :

```
    ...
    "require": {
        ...
        "grimmlink/alipay-bundle": "dev-master",
        ...
    },
    ...
```

Add this bundle to your app/AppKernel.php :

```
public function registerBundles()
{
    return array(
        // ...
        new Grimmlink\AlipayBundle\GrimmlinkAlipayBundle(),
        // ...
    );
}
```

Configuration
-------------

[](#configuration)

Your personnal account informations must be set in your config.yml

```
# Grimmlink Alipay Bundle
grimmlink_alipay:
    config:
        https_verify_url:   https://mapi.alipay.net/gateway.do          # The API endpoint
        key:                'abcdefghijklmnopqrstuvwxyz123456'          # Your account key - alipay testing environment: 760bdzec6y9goq7ctyx96ezkz78287de
    parameters:
        partner:            '1234567890123456'                          # Your partner number - alipay testing environment: 2088101122136241
        currency:           EUR                                         # Cannot be CNY / RMB !!
        input_charset:      utf-8                                       #
        service:            create_forex_trade                          #
```

Routing
-------

[](#routing)

```
# Grimmlink Alipay Bundle
grimmlink_alipay:
    resource: '@GrimmlinkAlipayBundle/Resources/config/routing.yml'
```

Usage
-----

[](#usage)

In your Payment controller :

```
...
    $apr = $this->get('grimmlink_alipay.request_handler');
    $apr->setParameters(array(
        'notify_url'        => $this->generateUrl('grimmlink_alipay_notify', array(), true),
        'return_url'        => $this->generateUrl('payment_alipay_return', array(), true), // make it your own
        'out_trade_no'      => $ref,  // make it your own
        'total_fee'         => '0.01', // make it your own
        'subject'           => 'Payment title', // make it your own
        'body'              => 'This is the payment description', // make it your own
    ));

    return $this->render('PaymentBundle:Alipay:pay.html.twig', array(
        'url'       => $apr->getUrl(),
        'form'      => $apr->getForm()->createView(),
    ));
...
```

Do not forget to create the controller action for your return URL, and do not include payment treatment inside, this is done in the Notification event listener.

Then, create your own Alipay Notification service listener, like this :

```
services:
    ...
    alipay.notification:
        class: Grimmlink\PaymentBundle\EventListener\AlipayListener
        tags:
            - { name: kernel.event_listener, event: alipay.notify_response, method: onAlipayNotificationResponse }
```

Create your Listener class and put your payment logic inside The AlipayResponseEvent contains

- data : the Query parameters sent by Alipay
- response : "true" if the notification has been validated
- signed : boolean - is the Alipay response's signature valid

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3322d ago

Major Versions

1.0 → 2.02017-04-13

PHP version history (2 changes)1.0PHP &gt;=5.3.2

2.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/5cf8190637c2b6af659c7e174d2f03130ac96b443d5bc7edaae2e41b1b44ac6d?d=identicon)[grimmlink](/maintainers/grimmlink)

---

Top Contributors

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

---

Tags

alipaypaymentphpsymfonysymfony-bundle

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[sylius/invoicing-plugin

Invoicing plugin for Sylius.

901.0M2](/packages/sylius-invoicing-plugin)

PHPackages © 2026

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