osCommerce
Official dpay.pl payment module for osCommerce. Enables accepting online payments in your osCommerce-based store. Supports BLIK Level 0 (inline), credit cards, PayPal, and other payment methods.
Requirements
- osCommerce 2.3.x 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
- Download the module files from dpay.pl or from GitHub.
- Copy the files to the osCommerce root directory, preserving the directory structure:
includes/modules/payment/dpay.php- main module fileincludes/languages/english/modules/payment/dpay.php- English translationsincludes/languages/polish/modules/payment/dpay.php- Polish translationsext/modules/payment/dpay/callback.php- IPN notification handlerlib/dpay-sdk/- dpay.pl SDK library
- Log in to the osCommerce admin panel.
- Navigate to Modules > Payment.
- Find dpay.pl on the list and click Install.
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 (
- In the Payment Point settings, set the IPN URL to:
https://your-store.com/ext/modules/payment/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
- Navigate to Modules > Payment in the admin panel.
- Click dpay.pl on the list, then click Edit.
- Fill in the configuration form:
| Field | Description |
|---|---|
| Enable dpay.pl | Enable/disable the payment module |
| Service Name | Service name from the dpay.pl Dashboard |
| Hash Key | Secret hash from the dpay.pl Dashboard |
| Sort Order | Display order in the payment methods list |
| Payment Zone | Restrict to a specific geographic zone (0 = all) |
| Pending Order Status | Order status for pending payments |
| Paid Order Status | Order status after successful payment |
| Enable PayPal | Enable/disable PayPal payments |
| Enable Credit Card | Enable/disable card payments |
| Enable Paysafecard | Enable/disable Paysafecard payments |
| Enable Installments | Enable/disable installment payments |
| Hide Bank List | Hide the bank list |
| Enable BLIK Zero | Enable BLIK Level 0 (inline) payments |
| Enable Apple Pay | Enable Apple Pay payments |
| Enable Google Pay | Enable Google Pay payments |
| Enable 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 osCommerce 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 status | osCommerce status |
|---|---|
| New transaction | Pending (default: 1) |
completed | Paid (default: 2) |
| BLIK inline | Pending (awaiting confirmation) |
Troubleshooting
Orders do not change status automatically
- Verify that the IPN URL (
/ext/modules/payment/dpay/callback.php) is correctly set in the dpay.pl Dashboard. - Make sure the callback file is publicly accessible and not blocked by
.htaccessor a firewall. - Check the server 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.