PHPackages                             pledg/sylius-payment-plugin - 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. pledg/sylius-payment-plugin

ActiveSylius-plugin

pledg/sylius-payment-plugin
===========================

Payment Gateway Plugin using Pledg

2.1.0(1y ago)311.4k2MITPHPPHP ^7.4 | ^8.0

Since Jan 7Pushed 1y ago12 watchersCompare

[ Source](https://github.com/pledgcorporate/ecard-sylius)[ Packagist](https://packagist.org/packages/pledg/sylius-payment-plugin)[ RSS](/packages/pledg-sylius-payment-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (35)Versions (32)Used By (0)

Sylius Payment Gateway Plugin using Pledg
=========================================

[](#sylius-payment-gateway-plugin-using-pledg)

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

[](#installation)

1. Install the package (beware of which version of our plugin supports your version of Sylius)

```
    composer require pledg/sylius-payment-plugin
```

2. Import routes in one of your routing file or create a new one (like `config/routes/pledg_sylius_payment.yaml`)

```
    pledg_sylius_payment:
        resource: "@PledgSyliusPaymentPlugin/Resources/config/routing.yml"
        prefix: /pledg
```

3. Clear your cache in order to see translations

```
    bin/console c:c
```

Sandbox and production environment
----------------------------------

[](#sandbox-and-production-environment)

By default, plugin uses sandbox mode. You can configure it by specify the mode in your configuration files. For example if you only want to disable the sandbox mode for the production environment you just have to create a `config/packages/prod/pledg_sylius_payment_plugin.yaml` file with :

```
    pledg_sylius_payment:
        sandbox: false
```

Create your payment method
--------------------------

[](#create-your-payment-method)

Now you can use the plugin and create your first Pledg Payment method :

1. Select the Pledg Type

[![](docs/images/step1.png)](docs/images/step1.png)

2. Fill all required fields (specially with your merchant id, secret and restricted countries). Don't forget to activate the method on your channel.

[![](docs/images/step2.png)](docs/images/step2.png)

Pledg allow to use a payment method without a signature but the plugin does not allow it. So even in sandbox mode, the secret is required and exchanges will be signed.

Add assets
----------

[](#add-assets)

```
mkdir -p templates/bundles/SyliusAdminBundle/
mkdir -p templates/bundles/SyliusShopBundle/
cp -R vendor/pledg/sylius-payment-plugin/tests/Application/templates/bundles/SyliusAdminBundle/* templates/bundles/SyliusAdminBundle/
cp -R vendor/pledg/sylius-payment-plugin/tests/Application/templates/bundles/SyliusShopBundle/* templates/bundles/SyliusShopBundle/
```

Add state machine configuration
-------------------------------

[](#add-state-machine-configuration)

Import the configuration in `_sylius.yaml` or your `pledg_sylius_payment_plugin.yaml` file :

```
imports:
  - { resource: "@PledgSyliusPaymentPlugin/Resources/config/state_machine.yaml" }
```

How the plugin works ?
----------------------

[](#how-the-plugin-works-)

We use Payum and the Sylius payment workflow in order to redirect on the Pledg payment page. Pledg uses all the parameters already filled in order to avoid you to refill them again. If all mandatory parameters are filled, you just need to fill your banking information. Otherwise, you could potentially fill in your address and your phone number.

All parameters in this url are in a signature parameter corresponding to a JSON Web Token encoding with the HS256 algorithm.

The plugin reuses Payum in order to retrieve the result of the payment process.

We also have a webhook route for 2 types of Pledg notifications (Standard and Transfer mode). This 2 types are also signed : the first with a custom signature and the second with a JWT.

All the details (parameters, redirection url, pledg result, pledg errors, pledg notifications) are stored in the payment entity.

How to contribute ?
-------------------

[](#how-to-contribute-)

You just have to :

1. Retrieve the package
2. Launch `make install` to install the database
3. Launch `make up-d` in order to install the plugin in a dockerized environment with a test application
4. Launch `make ci` if you want to check if everything works fine
5. Make a PR and check if the CI is green. Do not forget to upgrade the version number in the CHANGELOG.md and in the Pledg\\SyliusPaymentPlugin\\RedirectUrl\\ParamBuilder.php file.

The plugin does not (yet) use behat. To compensate this, we wrote unit tests with PHPUnit in a [classical way](https://github.com/testdouble/contributing-tests/wiki/Detroit-school-TDD).

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance42

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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 ~66 days

Recently: every ~43 days

Total

23

Last Release

479d ago

Major Versions

1.1.8 → 2.0.02023-01-31

PHP version history (4 changes)1.0.0PHP ^7.3

1.1.2PHP ^7.3 | ^8,0

2.0.0PHP ^7.4 | ^8,0

2.0.3PHP ^7.4 | ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/87753cd4cfb70aeebb290110913472804bec74011c0cd6b2b0c633dffe87ac16?d=identicon)[Pledg](/maintainers/Pledg)

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

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

![](https://www.gravatar.com/avatar/18c9aaf735d2b4738922ac647b7316d24359f30ce8084609e4f7be5ebbab7e19?d=identicon)[etiennegaschet\_pledg](/maintainers/etiennegaschet_pledg)

---

Top Contributors

[![FabienSalles](https://avatars.githubusercontent.com/u/937901?v=4)](https://github.com/FabienSalles "FabienSalles (104 commits)")[![Kvn91](https://avatars.githubusercontent.com/u/5636731?v=4)](https://github.com/Kvn91 "Kvn91 (9 commits)")[![etiennegaschet](https://avatars.githubusercontent.com/u/4664325?v=4)](https://github.com/etiennegaschet "etiennegaschet (7 commits)")[![pledg-elefranc](https://avatars.githubusercontent.com/u/90066709?v=4)](https://github.com/pledg-elefranc "pledg-elefranc (2 commits)")[![benlienart](https://avatars.githubusercontent.com/u/7664692?v=4)](https://github.com/benlienart "benlienart (1 commits)")

---

Tags

syliussylius-plugin

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pledg-sylius-payment-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/pledg-sylius-payment-plugin/health.svg)](https://phpackages.com/packages/pledg-sylius-payment-plugin)
```

###  Alternatives

[sylius/paypal-plugin

PayPal plugin for Sylius.

451.4M4](/packages/sylius-paypal-plugin)[webgriffe/sylius-upgrade-plugin

Helps you upgrade your Sylius app to a new version.

13103.1k](/packages/webgriffe-sylius-upgrade-plugin)[synolia/sylius-gdpr-plugin

Synolia sylius GDPR plugin.

20148.1k](/packages/synolia-sylius-gdpr-plugin)[webgriffe/sylius-akeneo-plugin

Plugin allowing to import products data from Akeneo PIM to your Sylius store.

2477.8k](/packages/webgriffe-sylius-akeneo-plugin)[webgriffe/sylius-table-rate-shipping-plugin

Provides table rate shipping calculator.

1490.4k](/packages/webgriffe-sylius-table-rate-shipping-plugin)[bitbag/przelewy24-plugin

Przelewy24 payment plugin for Sylius applications.

1931.7k](/packages/bitbag-przelewy24-plugin)

PHPackages © 2026

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