Skip to main content

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

  1. Log in to the dpay.pl Dashboard.
  2. Go to the Payment Points section.
  3. Create a new Payment Point or select an existing one.
  4. Take note of:
    • Service name (service_name) - unique name of your Payment Point
    • Secret hash (secret_hash) - key used for signing requests
  5. 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

  1. Go to the Sylius admin panel.
  2. Open Configuration > Payment methods.
  3. Click Create and select the dPay.pl gateway.
  4. Fill in the configuration form:
FieldDescription
Service NameService name from the dpay.pl Dashboard
Hash KeySecret hash from the dpay.pl Dashboard
PayPalEnable/disable PayPal payments
Credit CardEnable/disable card payments
PaysafecardEnable/disable Paysafecard payments
InstallmentEnable/disable installment payments
No BanksHide the bank list
BLIK ZeroEnable BLIK Level 0 (inline) payments
Apple PayEnable Apple Pay payments
Google PayEnable Google Pay payments
Card InlineEnable inline card form
  1. Save the configuration.

Step 3 - Verification

  1. Place a test order in your store.
  2. Select dPay.pl as the payment method.
  3. Verify that you are correctly redirected to the payment page.
  4. 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_amount field)

The refund will be automatically sent to the dpay.pl API.


Status mapping

dpay.pl statusSylius (Payum) status
pendingPending
pending_inlinePending (BLIK inline)
completedCaptured (Paid)
failedFailed
refundedRefunded

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.log or var/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.

More information