Sylius
Official dpay.pl plugin for the Sylius platform. Enables accepting online payments in your Sylius-based online store using the Payum library. Supports the full payment lifecycle - from transaction registration, through IPN notifications, to refunds.
Requirements
- Sylius 1.12 or 2.0+
- PHP 8.1 or newer
- Payum Core 1.7+
- Composer
- Active account in the dpay.pl Dashboard with a configured Payment Point
Supported payment methods
- BLIK (including BLIK Level 0 - inline)
- Bank transfers (pay-by-link)
- Credit cards (inline)
- Google Pay and Apple Pay
- PayPal
- Paysafecard
- Installments (BLIK BNPL)
Installation
Install the plugin using Composer:
composer require dpay/sylius-plugin
Then register the bundle in the config/bundles.php file:
return [
// ...
DPay\SyliusPlugin\DPaySyliusPlugin::class => ['all' => true],
];
Import the service configuration. Create the file config/packages/dpay_sylius_plugin.yaml:
imports:
- { resource: "@DPaySyliusPlugin/config/services.xml" }
Clear the cache:
bin/console cache:clear
Configuration
Step 1 - Prepare credentials in the dpay.pl Dashboard
- Log in to the dpay.pl Dashboard.
- Go to the Payment Points section.
- Create a new Payment Point or select an existing one.
- Take note of:
- Service name (
service_name) - unique name of your Payment Point - Secret hash (
secret_hash) - key used for signing requests
- Service name (
- The IPN URL will be set automatically by Payum (notify token).
Important
The secret hash should be treated like a password. Never share it publicly or include it in frontend code.
Step 2 - Payment gateway configuration in Sylius
- Go to the Sylius admin panel.
- Open Configuration > Payment methods.
- Click Create and select the dPay.pl gateway.
- Fill in the configuration form:
| Field | Description |
|---|---|
| Service Name | Service name from the dpay.pl Dashboard |
| Hash Key | Secret hash from the dpay.pl Dashboard |
| PayPal | Enable/disable PayPal payments |
| Credit Card | Enable/disable card payments |
| Paysafecard | Enable/disable Paysafecard payments |
| Installment | Enable/disable installment payments |
| No Banks | Hide the bank list |
| BLIK Zero | Enable BLIK Level 0 (inline) payments |
| Apple Pay | Enable Apple Pay payments |
| Google Pay | Enable Google Pay payments |
| Card Inline | Enable inline card form |
- Save the configuration.
Step 3 - Verification
- Place a test order in your store.
- Select dPay.pl as the payment method.
- Verify that you are correctly redirected to the payment page.
- After completing the payment, check whether the order status in Sylius has changed to Paid.
Refunds
The plugin supports online refunds via the Payum Refund mechanism. Refunds can be:
- Full - refund of the entire transaction amount
- Partial - refund of a selected amount (set via the
dpay_refund_amountfield)
The refund will be automatically sent to the dpay.pl API.
Status mapping
| dpay.pl status | Sylius (Payum) status |
|---|---|
pending | Pending |
pending_inline | Pending (BLIK inline) |
completed | Captured (Paid) |
failed | Failed |
refunded | Refunded |
Troubleshooting
Orders do not change status automatically
- Verify that the Payum notify token is being generated correctly.
- Make sure the dpay.pl server can access the IPN URL (not blocked by a firewall).
- Check Symfony logs:
var/log/dev.logorvar/log/prod.log.
"Only PLN currency is supported" error
- The plugin only supports the PLN currency. Make sure the sales channel in Sylius has PLN set as the currency.
"Invalid IPN payload" error
- Make sure the Hash Key in the gateway configuration matches the hash in the dpay.pl Dashboard.
- Check for any extra spaces before or after the key value.
Plugin does not appear as a gateway option
- Verify that the bundle is correctly registered in
config/bundles.php. - Clear the cache:
bin/console cache:clear.