Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
42eeedb
PPSYL-170 - Avoid critical when no payment id yet
Jibbarth Feb 16, 2026
cdfa1d2
PPSYL-170 - Avoid send details from mollie to payplug
Jibbarth Feb 16, 2026
bf9adfb
PPSYL-171 - Update readme instruction / fix links
Jibbarth Feb 16, 2026
55be2d2
Hotfix - Bump phpunit
Jibbarth Feb 16, 2026
bf3c59c
Fix Phpstan
Jibbarth Feb 16, 2026
95d39bf
Remove install ca certificate, not used anymore
Jibbarth Feb 16, 2026
43abd9a
PPSYL-174 - Add note for assets on 2.0.x
Jibbarth Mar 3, 2026
06d1a4f
PPSYL-177 - handle canceled by oney status
Jibbarth Mar 4, 2026
c40e6e8
PPSYL-173 - Update namespace for gatewayConfigInterface
Jibbarth Mar 3, 2026
f095637
PPSYL-173 - Improve refundUnits command creator decorator
Jibbarth Mar 4, 2026
9209026
PPSYL-173 - Mark RefundPaymentGeneratedHandler as MessageHandler
Jibbarth Mar 4, 2026
0a3d9de
PPSYL-173 - Remove useless controllers for refund
Jibbarth Mar 4, 2026
bdd1fdc
PPSYL-173 - Handle refund from notification
Jibbarth Mar 4, 2026
2ed6ac6
Mark payum classes as deprecated
Jibbarth Mar 4, 2026
d83bee6
PPSYL-173 - Fix phpstan issues
Jibbarth Mar 9, 2026
33583f6
[Checkout] Refact switch methods
Jibbarth Mar 18, 2026
cb18a9d
[Checkout] Update logos
Jibbarth Mar 18, 2026
538738e
[Checkout] Unminify integrated payment.css
Jibbarth Mar 18, 2026
96fd441
[Checkout] Improve enable/disable next step
Jibbarth Mar 18, 2026
80c956a
PPSYL-176 - Improve applepay stimulus controller and template
Jibbarth Mar 30, 2026
ba7cfe3
PPSYL-176 - Fix retrieving ressource in OrderController and service i…
Jibbarth Mar 30, 2026
d1c16c6
PPSYL-176 - Improve disabling payment method when not eligible
Jibbarth Mar 30, 2026
3eb16e8
PPSYL-176 - Latest ApplePay sdk version make it compatible with more …
Jibbarth Mar 30, 2026
0d40e00
PPSYL-176 - Remove useless header
Jibbarth Mar 30, 2026
04f5ca1
PPSYL-176 - Fix switching method enable next button or not
Jibbarth Mar 30, 2026
28590a0
Fix toggle next button when no integrated payment
Jibbarth Apr 1, 2026
79683ac
PPSYL-176 - Fix retrieving applepay token, add more log, unify next r…
Jibbarth Apr 2, 2026
9ad8954
PPSYL-176 - Fix returning data when fail to handle next route
Jibbarth Apr 2, 2026
f99e3f2
PPSYL-176 - Clean Provider, apple-pay-controller
Jibbarth Apr 9, 2026
311e451
PPSYL-176 - Improve retrieve order in notify
Jibbarth Apr 9, 2026
0a77cad
PPSYL-176 - Use api client for payment method when abort, not default…
Jibbarth Apr 9, 2026
bee69bb
PPSYL-176 - Phpstan
Jibbarth Apr 9, 2026
3019aec
Prevent 500 when payment method has never been unifiedauth
Jibbarth Apr 14, 2026
d82b031
Hotfix - Clean cache client config after new oauth
Jibbarth Apr 14, 2026
e5537ec
upgrade-v2: update README with complete instructions
adumont-payplug Apr 17, 2026
3d4c86a
FIX: fixing dependency injection for installation
adumont-payplug Apr 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/workflows/sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ jobs:
-
name: 'Install Sylius-Standard and Plugin'
run: 'make install -e SYLIUS_VERSION=${{ matrix.sylius }} SYMFONY_VERSION=${{ matrix.symfony }}'
-
name: 'Install certificates'
run: 'symfony server:ca:install'
-
name: 'Run Chrome headless'
run: 'google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server=''direct://'' --proxy-bypass-list=''*'' https://127.0.0.1 > /dev/null 2>&1 &'
-
name: 'Run webserver'
run: 'symfony server:start --port=8080 --daemon'
id: end-of-setup-sylius
-
name: 'Doctrine Schema Validate - Run'
Expand All @@ -98,14 +89,6 @@ jobs:
name: 'Run PHPUnit'
run: 'make phpunit'
if: 'always() && steps.end-of-setup-sylius.outcome == ''success'''
# -
# name: 'Configure Behat'
# run: 'make behat-configure'
# if: 'always() && steps.end-of-setup-sylius.outcome == ''success'''
# -
# name: 'Run behat'
# run: 'vendor/bin/behat --strict --no-interaction -f progress || vendor/bin/behat --strict -vvv --no-interaction --rerun'
# if: 'always() && steps.end-of-setup-sylius.outcome == ''success'''
-
uses: actions/upload-artifact@v4
if: failure()
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@
/tests/TestApplication/.env.local
/tests/TestApplication/.env.*.local
/var/


Audit.md
CLAUDE.md
.DS_Store
.claude
.review
254 changes: 115 additions & 139 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
[![License](https://img.shields.io/packagist/l/payplug/payplug-sylius.svg)](https://github.com/payplug/SyliusPayPlugPlugin/blob/master/LICENSE)
![CI](https://github.com/payplug/SyliusPayPlugPlugin/workflows/CI/badge.svg?branch=master)
[![Version](https://img.shields.io/packagist/v/payplug/payplug-sylius.svg)](https://packagist.org/packages/payplug/payplug-sylius)
[![Total Downloads](https://poser.pugx.org/payplug/payplug-sylius/downloads)](https://packagist.org/packages/payplug/payplug-sylius)
[![License](https://img.shields.io/packagist/l/payplug/sylius-payplug-plugin.svg)](https://github.com/payplug/SyliusPayPlugPlugin/blob/master/LICENSE)
[![CI - Analysis](https://github.com/payplug/SyliusPayPlugPlugin/actions/workflows/analysis.yaml/badge.svg?branch=master)](https://github.com/payplug/SyliusPayPlugPlugin/actions/workflows/analysis.yaml)
[![CI - Sylius](https://github.com/payplug/SyliusPayPlugPlugin/actions/workflows/sylius.yaml/badge.svg?branch=master)](https://github.com/payplug/SyliusPayPlugPlugin/actions/workflows/sylius.yaml)
[![Version](https://img.shields.io/packagist/v/payplug/sylius-payplug-plugin.svg)](https://packagist.org/packages/payplug/sylius-payplug-plugin)
[![Total Downloads](https://poser.pugx.org/payplug/sylius-payplug-plugin/downloads)](https://packagist.org/packages/payplug/sylius-payplug-plugin)

<p align="center">
<a href="https://sylius.com" target="_blank">
<img src="https://demo.sylius.com/assets/shop/img/logo.png" />
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://media.sylius.com/sylius-logo-800-dark.png">
<source media="(prefers-color-scheme: light)" srcset="https://media.sylius.com/sylius-logo-800.png">
<img alt="Sylius Logo." src="https://media.sylius.com/sylius-logo-800.png">
</picture>
</a>
</p>

Expand All @@ -26,150 +31,145 @@ In local environment, the plugin will not work properly because you will not be

## Compatibility

| | Version |
| :--- |:----------------------|
| PHP | 7.4, 8.0, 8.1 |
| Sylius | 1.9, 1.10, 1.11, 1.12 |
| | Version |
|:-------|:--------|
| PHP | ^8.2 |
| Sylius | ^2.0 |

## Installation

1. Require the **payplug/sylius-payplug-plugin** :
### With Symfony Flex

```bash
composer config extra.symfony.allow-contrib true
composer require payplug/sylius-payplug-plugin
```
#### 1. Allow contrib recipes and require the plugin

2. Apply migrations to your database:
```bash
composer config extra.symfony.allow-contrib true
composer require payplug/sylius-payplug-plugin
```

```shell
bin/console doctrine:migrations:migrate
```
#### 2. Install the Flex recipe

```bash
composer recipes:install payplug/sylius-payplug-plugin --force
```

3. Copy templates that are overridden by Sylius into `templates/bundles/SyliusAdminBundle`

```shell
mkdir -p templates/bundles/SyliusAdminBundle/
cp -R vendor/payplug/sylius-payplug-plugin/templates/SyliusAdminBundle/* templates/bundles/SyliusAdminBundle/
```
This automatically registers the bundle, copies configuration files, and sets up assets (on Sylius 2.1+).

4. Add Payplug to refundable payment method for Sylius Refund Plugin in `config/services.yaml`
#### 3. Apply migrations to your database

```yaml
parameters:
locale: fr_FR
sylius_refund.supported_gateways:
- payplug
- payplug_oney
- payplug_bancontact
- payplug_apple_pay
- payplug_american_express
```
```shell
bin/console doctrine:migrations:migrate
```

5. Add Payplug routes in `config/routes.yaml`
#### 4. Add Payplug to refundable payment methods for Sylius Refund Plugin in `config/services.yaml`

```yaml
sylius_payplug:
resource: "@PayPlugSyliusPayPlugPlugin/config/routing.yaml"
```
```yaml
parameters:
locale: fr_FR
sylius_refund.supported_gateways:
- payplug
- payplug_oney
- payplug_bancontact
- payplug_apple_pay
- payplug_american_express
```

8. Add Traits for Customer and PaymentMethod entities
#### 5. Add Traits for Customer and PaymentMethod entities

* App\Entity\Customer\Customer

```php
<?php
```php
<?php

declare(strict_types=1);
declare(strict_types=1);

namespace App\Entity\Customer;
namespace App\Entity\Customer;

use Doctrine\ORM\Mapping as ORM;
use PayPlug\SyliusPayPlugPlugin\Entity\CardsOwnerInterface;
use PayPlug\SyliusPayPlugPlugin\Entity\Traits\CustomerTrait;
use Sylius\Component\Core\Model\Customer as BaseCustomer;
use Doctrine\ORM\Mapping as ORM;
use PayPlug\SyliusPayPlugPlugin\Entity\CardsOwnerInterface;
use PayPlug\SyliusPayPlugPlugin\Entity\Traits\CustomerTrait;
use Sylius\Component\Core\Model\Customer as BaseCustomer;

/**
* @ORM\Entity
* @ORM\Table(name="sylius_customer")
*/
#[ORM\Entity]
#[ORM\Table(name: 'sylius_customer')]
class Customer extends BaseCustomer implements CardsOwnerInterface
{
use CustomerTrait;
}
```
/**
* @ORM\Entity
* @ORM\Table(name="sylius_customer")
*/
#[ORM\Entity]
#[ORM\Table(name: 'sylius_customer')]
class Customer extends BaseCustomer implements CardsOwnerInterface
{
use CustomerTrait;
}
```

* App\Entity\Payment\PaymentMethod

```php
<?php

declare(strict_types=1);

namespace App\Entity\Payment;

use Doctrine\ORM\Mapping as ORM;
use PayPlug\SyliusPayPlugPlugin\Entity\Traits\PaymentMethodTrait;
use Sylius\Component\Core\Model\PaymentMethod as BasePaymentMethod;
use Sylius\Component\Payment\Model\PaymentMethodTranslationInterface;

/**
* @ORM\Entity
* @ORM\Table(name="sylius_payment_method")
*/
#[ORM\Entity]
#[ORM\Table(name: 'sylius_payment_method')]
class PaymentMethod extends BasePaymentMethod
```php
<?php

declare(strict_types=1);

namespace App\Entity\Payment;

use Doctrine\ORM\Mapping as ORM;
use PayPlug\SyliusPayPlugPlugin\Entity\Traits\PaymentMethodTrait;
use Sylius\Component\Core\Model\PaymentMethod as BasePaymentMethod;
use Sylius\Component\Payment\Model\PaymentMethodTranslationInterface;

/**
* @ORM\Entity
* @ORM\Table(name="sylius_payment_method")
*/
#[ORM\Entity]
#[ORM\Table(name: 'sylius_payment_method')]
class PaymentMethod extends BasePaymentMethod
{
use PaymentMethodTrait;

protected function createTranslation(): PaymentMethodTranslationInterface
{
use PaymentMethodTrait;

protected function createTranslation(): PaymentMethodTranslationInterface
{
return new PaymentMethodTranslation();
}
return new PaymentMethodTranslation();
}
```
}
```

* App\Entity\Payment\Payment

```php
<?php
```php
<?php

declare(strict_types=1);
declare(strict_types=1);

namespace App\Entity\Payment;
namespace App\Entity\Payment;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use PayPlug\SyliusPayPlugPlugin\Entity\Traits\PaymentTrait;
use Sylius\Component\Core\Model\Payment as BasePayment;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use PayPlug\SyliusPayPlugPlugin\Entity\Traits\PaymentTrait;
use Sylius\Component\Core\Model\Payment as BasePayment;

/**
* @ORM\Entity
* @ORM\Table(name="sylius_payment")
*/
#[ORM\Entity]
#[ORM\Table(name: 'sylius_payment')]
class Payment extends BasePayment
{
use PaymentTrait;
}
```
/**
* @ORM\Entity
* @ORM\Table(name="sylius_payment")
*/
#[ORM\Entity]
#[ORM\Table(name: 'sylius_payment')]
class Payment extends BasePayment
{
use PaymentTrait;
}
```

9. Process translations
#### 6. Process translations

```bash
php bin/console translation:extract en PayPlugSyliusPayPlugPlugin --dump-messages
php bin/console translation:extract fr PayPlugSyliusPayPlugPlugin --dump-messages
```
```bash
php bin/console translation:extract en PayPlugSyliusPayPlugPlugin --dump-messages
php bin/console translation:extract fr PayPlugSyliusPayPlugPlugin --dump-messages
```

10. Clear cache:
#### 7. Clear cache

```shell
php bin/console cache:clear
```
```bash
bin/console cache:clear
```

🎉 You are now ready to add Payplug Payment method.
In your back-office, go to `Configuration > Payment methods`, then click on `Create` and choose "**Payplug**".
Expand Down Expand Up @@ -199,30 +199,6 @@ Run the below command to see what Symfony services are shared with this plugin:
$ bin/console debug:container payplug_sylius_payplug_plugin
```

### Template overriding

This plugin override some sylius templates.
If you plan override them also, you should retrieve them in your application.

Copy Sylius templates overridden in plugin to your templates directory (e.g templates/bundles/)

```shell
mkdir -p templates/bundles/SyliusAdminBundle/
mkdir -p templates/bundles/SyliusShopBundle/
mkdir -p templates/bundles/SyliusUiBundle/
cp -R vendor/payplug/sylius-payplug-plugin/templates/SyliusAdminBundle/* templates/bundles/SyliusAdminBundle/
cp -R vendor/payplug/sylius-payplug-plugin/templates/SyliusShopBundle/* templates/bundles/SyliusShopBundle/
cp -R vendor/payplug/sylius-payplug-plugin/templates/SyliusUiBundle/* templates/bundles/SyliusUiBundle/
```

You also need to edit your twig config to add your path to avoid our configuration to be prepended :
```yaml
twig:
paths:
'%kernel.project_dir%/templates/bundles/SyliusAdminBundle': SyliusAdmin
'%kernel.project_dir%/templates/bundles/SyliusShopBundle': SyliusShop
'%kernel.project_dir%/templates/bundles/SyliusUiBundle': SyliusUi
```
## Development

See [How to contribute](CONTRIBUTING.md).
Expand Down
Loading
Loading