Skip to main content

Zen Cart

Official dpay.pl payment module for Zen Cart. Enables accepting online payments in your Zen Cart-based online store. Supports BLIK Level 0 (inline), credit cards, PayPal, and other payment methods.


Requirements

  • Zen Cart 1.5.7 or newer
  • PHP 7.4 or newer
  • 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

  1. Download the module files from dpay.pl or from GitHub.
  2. Copy the files to the Zen Cart root directory, preserving the directory structure:
    • includes/modules/payment/dpay.php - main module file
    • includes/languages/english/modules/payment/lang.dpay.php - English translations
    • includes/languages/polish/modules/payment/lang.dpay.php - Polish translations
    • dpay_callback.php - IPN notification handler
    • lib/dpay-sdk/ - dpay.pl SDK library
  3. Log in to the Zen Cart admin panel.
  4. Navigate to Modules > Payment.
  5. Find dpay.pl on the list and click Install.

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. In the Payment Point settings, set the IPN URL to:
    https://your-store.com/dpay_callback.php
Important

The secret hash should be treated like a password. Never share it publicly or include it in frontend code.

Step 2 - Module configuration

  1. Navigate to Modules > Payment in the admin panel.
  2. Click dpay.pl on the list, then click Edit.
  3. Fill in the configuration form:
FieldDescription
Enable dpay.plEnable/disable the payment module
Service NameService name from the dpay.pl Dashboard
Hash KeySecret hash from the dpay.pl Dashboard
Sort OrderDisplay order in the payment methods list
Payment ZoneRestrict to a specific geographic zone (0 = all)
Pending Order StatusOrder status for pending payments
Paid Order StatusOrder status after successful payment
Enable PayPalEnable/disable PayPal payments
Enable Credit CardEnable/disable card payments
Enable PaysafecardEnable/disable Paysafecard payments
Enable InstallmentsEnable/disable installment payments
Hide Bank ListHide the bank list
Enable BLIK ZeroEnable BLIK Level 0 (inline) payments
Enable Apple PayEnable Apple Pay payments
Enable Google PayEnable Google Pay payments
Enable 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 Zen Cart has changed to the appropriate paid status.

Refunds

The module supports online refunds via the dpay.pl API. Refunds can be:

  • Full - refund of the entire transaction amount
  • Partial - refund of a selected amount

A refund can be triggered programmatically using the refund($transactionId, $amount) method of the module class.


Status mapping

dpay.pl statusZen Cart status
New transactionPending (default: 1)
completedPaid (default: 2)
BLIK inlinePending (awaiting confirmation)

Troubleshooting

Orders do not change status automatically

  • Verify that the IPN URL (/dpay_callback.php) is correctly set in the dpay.pl Dashboard.
  • Make sure the callback file is publicly accessible and not blocked by .htaccess or a firewall.
  • Check Zen Cart logs in the logs/ directory.

"BAD SIGNATURE" error

  • Make sure the Hash Key in the module configuration matches the hash in the dpay.pl Dashboard.
  • Check for any extra spaces before or after the key value.

Module does not appear at checkout

  • Verify that the module is installed and enabled (Enable dpay.pl = True).
  • Make sure the order currency is PLN - the module only supports the PLN currency.

BLIK error - invalid code

  • The BLIK code must consist of exactly 6 digits. Make sure the BLIK field is filled in correctly.

More information