Skip to content

About

PayU plugin for PrestaShop 1.6, 1.7, 8 and 9

Resources

Security policy

Stars

70 stars

Watchers

36 watching

Forks

Repository files navigation

Wersja polska

PayU module for PrestaShop 1.6, 1.7, 8 and 9

If you have any questions or want to report a bug, please contact our technical support.

Table of Contents

Features

The PayU payment module adds the PayU payment option to PrestaShop. Module version 3.x supports PrestaShop 1.6, 1.7, 8 and 9 and enables the following operations:

Feature PrestaShop 1.6 PrestaShop 1.7 / 8 / 9
Creating a payment (with discounts included) ✅ ✅
Capturing or rejecting a payment (when auto-capture is disabled) ✅ ✅
Creating a refund (full or partial) ✅ ✅
Displaying and selecting payment methods on the checkout page ✅ ✅
Card payment as a separate method ✅ ✅
Card payment via widget ✅ ✅
Google Pay as a separate method ✅ ✅
Apple Pay as a separate method ✅ ✅
BLIK payment as a separate method ✅ ✅
Payment retry ✅ ✅
Payment status on the order confirmation page ❌ ✅
Multi-currency support ✅ ✅
Payment method order ✅ ✅
PayU Installments payment as a separate method ✅ ✅
Klarna payment as a separate method ✅ ✅
PayPo payment as a separate method ✅ ✅
Twisto payment as a separate method ✅ ✅
Twisto Pay in 3 payment as a separate method ✅ ✅
PragmaPay payment as a separate method ✅ ✅
Credit widget on the product page and product listing ✅ ✅
Credit widget on the checkout summary ✅ ✅
Credit widget in the cart ❌ ✅
Excluding credit payment methods from the credit widget ✅ ✅

More information on the features can be found in the More on features section.

All instructions refer to PrestaShop 1.7; for other versions, use the corresponding options.

Prerequisites

Important: This module works only with REST API (Checkout) points of sale (POS). If you do not have a PayU merchant account yet, register in Production or register in Sandbox.

The following PHP extensions are required: cURL and hash.

Installation

Option 1

recommended for users without FTP access to their PrestaShop installation

  1. Download the payu_prestashop_plugin_X.Y.Z.zip file of the latest module version from GitHub releases.
  2. Go to the PrestaShop administration page [http://store-address/adminxxx].
  3. Go to Modules » Module Manager.
  4. Click Upload a module and select the module archive (downloaded in step 1).

Option 2

recommended for users with FTP access to their PrestaShop installation

  1. Download the payu_prestashop_plugin_X.Y.Z.zip file of the latest module version from GitHub releases.
  2. Unzip the downloaded file.
  3. Connect to the server via FTP and upload the unzipped files to the modules/payu directory of your PrestaShop installation.

Upgrade

  1. Update the module files as described in Installation.
  2. Go to Modules » Module Manager.
  3. On the Updates tab, upgrade the module if an update is available.
  4. Go to Advanced Parameters » Performance and click Clear cache.

Configuration

  1. Go to the PrestaShop administration page [http://store-address/adminxxx].
  2. Go to Modules » Module Manager.
  3. Search for PayU and click Configure.

Integration method

Parameter Description
Bank list Enabled - the PayU payment method can be chosen on the checkout page when Pay by online transfer is selected more info.
Disabled - after placing an order in PrestaShop, the buyer is automatically redirected to PayU.
Do not enable this option if you are using an OPC module more info.
Payment Methods Order Sets the order of displayed payment methods (applies only to Bank list) more info.
Separate card payment Specifies whether card payment is available as a separate payment method more info.
Card payment on widget Specifies whether card payment is available as a widget more info.
Separate BLIK payment Specifies whether BLIK payment is available as a separate payment method.
PayU repayment Specifies whether the buyer can retry a failed payment more info.
SANDBOX mode Enabled - transactions are processed in the PayU Sandbox environment.
Disabled - transactions are processed in the PayU production environment.
Save logs Specifies whether the module saves information to logs more info.
Show status info after payment Specifies whether the current payment status is displayed on the order confirmation page (PrestaShop 1.7 / 8 / 9 only) more info.

Credit payments

Parameter Description
Separate installments Specifies whether PayU Installments is available as a separate payment method.
Separate pay later Klarna Specifies whether Klarna is available as a separate payment method.
Separate pay later PayPo Specifies whether PayPo is available as a separate payment method.
Separate pay later Twisto Specifies whether Twisto is available as a separate payment method.
Separate Twisto pay in 3 Specifies whether Twisto Pay in 3 is available as a separate payment method.
Separate PragmaPay Specifies whether PragmaPay is available as a separate payment method.
Show credit payments widget on cart Specifies whether the credit widget is displayed in the cart (PrestaShop 1.7 / 8 / 9 only).
Show credit payments widget on summary Specifies whether the credit widget is displayed on the checkout summary.
Show credit payments widget on product Specifies whether the credit widget is displayed on the product page and product listing.
Exclude credit payment methods from widget Comma-separated list of credit payment method codes that will not be presented in the widget, e.g. dpt,dpkl,dpp more info.

More information can be found in the Promote installments and Buy Now Pay Later payment methods section.

Google Pay and Apple Pay

Google Pay and Apple Pay parameters are described in the Google Pay and Apple Pay sections.

POS parameters

For each currency defined in PrestaShop, configure the following parameters (separately for the production and sandbox environments):

Parameter Description
POS ID POS identifier from the PayU system
Second key (MD5) Second MD5 key from the PayU system
OAuth - client_id client_id for OAuth from the PayU system
OAuth - client_secret client_secret for OAuth from the PayU system

Payment statuses

Mapping of PayU payment statuses to PrestaShop order statuses. Each status can be changed in the Payment statuses section of the module configuration.

Parameter PayU payment status Default status in PrestaShop
Pending status - status after placing order PayU payment started
Complete status COMPLETED Payment accepted
Canceled status CANCELED PayU payment canceled

Logging

When PrestaShop is switched to debug mode or the Save logs option is enabled, the module saves information to logs. Log files are stored in the following directory:

  • PrestaShop 1.7 / 8 / 9 - /var/logs
  • PrestaShop 1.6 - /log

More on features

Payment method order

Applies only when the Bank list option is set to Enabled.

To set the order of the payment method icons, enter payment method codes separated by commas. List of payment methods.

Multi-currency

A POS in the PayU system has only one currency. Therefore, to accept payments in multiple currencies, a POS has to be configured separately for each currency. The ERROR_INCONSISTENT_CURRENCIES error means that the currency is not supported by the POS. To accept payments in another currency, contact PayU – to enable it in the sandbox environment, or to sign a separate agreement for the production environment.

Payment method display

When the Bank list option is set to Enabled, after selecting Pay by online transfer the payment method icons are displayed directly on the PrestaShop page. The displayed icons are retrieved from the POS configuration in PayU, depending on the selected currency.

payment_methods

After a payment method icon is selected and the I confirm my order button is clicked, the buyer is redirected to the bank or the PayU card form.

Card payment

If the Separate card payment option is enabled, a method named Pay by card is displayed in the PrestaShop checkout process.

If the Bank list option is enabled, Pay by card is displayed only if card payments are available on your POS. Otherwise, Pay by card is always visible, but the payment will fail if card payments are not available on your POS.

payment_methods

Card payment widget

IMPORTANT - this feature works only if card tokenization is enabled on your POS in PayU. To enable it, please contact our technical support.

If both Separate card payment and Card payment on widget are enabled, the Pay by card option displays a widget for entering card data instead of redirecting to the PayU card form.

widget

Google Pay

If the Enable Google Pay option is enabled in the configuration, the Pay with Google Pay method appears in the list of payment methods during the PrestaShop checkout process. After selecting this method, the buyer is redirected to the Google Pay payment window.

google_pay

Parameters available for Google Pay:

Parameter Description
Enable Google Pay Specifies whether Google Pay is available as a separate payment method.
Google Merchant Id Merchant identifier in Google. You need to verify your shop in Google, following the instructions.
Google Merchant Name Merchant name displayed in the payment sheet.

Apple Pay

If the Enable Apple Pay option is enabled, Pay with Apple Pay appears as a separate payment method during checkout, provided that Apple Pay is enabled for the configured PayU POS. After the buyer confirms the order on a supported Apple device and browser, the Apple Pay payment sheet opens.

apple_pay

Before enabling this option, register the checkout domain for Apple Pay by following the PayU Apple Pay instructions. The registered domain must exactly match the domain on which the checkout page is displayed; otherwise, Apple will reject the payment request.

Parameters available for Apple Pay:

Parameter Description
Enable Apple Pay Specifies whether Apple Pay is available as a separate payment method.
Domain Name Checkout domain registered for Apple Pay. Enter the domain name only, without a protocol or path.
Display Name Store name displayed in the Apple Pay payment sheet. It must contain no more than 64 UTF-8 characters.

Payment retry

This feature enables the buyer to create a new payment for the same order if the previous payment was not successful (e.g. insufficient funds on the card, problems with logging in to the bank).

To use this feature, you also need to configure your POS in PayU properly by disabling "Automatic collection" (it is enabled by default). This option is available in the PayU panel: go to "Online payments", then "My shops", and then select the POS. Automatic collection is configured for every payment type, but you can disable it for all types at once using the button at the very bottom, under the payment type list.

Payment retry allows creating multiple payments in PayU for a single PrestaShop order. The module automatically collects the first successful payment, and all others are canceled. From the buyer's point of view, a payment can be retried:

  • by clicking the link in the order confirmation email,
  • in the order details.

retry_payment

All PayU payments created for a PrestaShop order are displayed on the order page in the PrestaShop admin panel.

Payment status on the order confirmation page

If the Show status info after payment option is enabled, the current payment status is displayed on the order confirmation page after the buyer returns from PayU. This option is available only in PrestaShop 1.7 / 8 / 9 and is enabled by default for new module installations.

Promote installments and Buy Now Pay Later payment methods

The module provides functionality for promoting installments and Buy Now Pay Later payment methods (also called "credit payments") by separating individual payment methods in the checkout view and displaying a credit widget on the product page, product listing, cart and checkout summary. Promoting installments and Buy Now Pay Later payment methods is configured in the "Credit payments" section of the module configuration. Separating PayU Installments and the credit widget are enabled by default. Supported features are listed in the Features section.

Presenting credit payment methods and the credit widget depends on gateway availability for the given point of sale (POS). The module automatically checks whether the "ai", "dpt", "dpcz", "dpts", "dpkl", "dpklczk", "dpkleur", "dpklhuf", "dpp", "dppron", "ppf" gateways are enabled. If a given credit payment method has not been enabled on the configured POS, it will not be presented in the checkout view or in the credit widget, even if it is enabled in the module configuration.

Presentation of installments and Buy Now Pay Later payment methods depending on PrestaShop version

PrestaShop version Category How it looks
1.7 Product listing
1.7 Product page
1.7 Cart
1.7 PayU Installments as a separate method
1.7 Klarna payment as a separate method
1.7 PayPo payment as a separate method
1.7 Twisto payment as a separate method
1.7 Twisto Pay in 3 payment as a separate method
1.7 PragmaPay payment as a separate method
1.6 Product listing
1.6 Product page

Presentation of the credit payments widget

Depending on the available credit payment methods, one of the following links appears in the page sections mentioned above: "Installment from", "0% installment from" or "Pay later". After clicking the link, the latest version of the credit widget ("miniInstallment" component) appears. It is part of the PayU Installments - best practices package, which can be found in the official documentation.

The credit widget looks as follows:

Since version 3.3.0, it is possible to exclude selected credit payment methods from the widget using the "Exclude credit payment methods from widget" field in the module configuration. For example, entering dpp,dpkl,dpt in this field removes PayPo, Klarna and Twisto from the widget:

Known issues

PrestaShop and OPC modules

Because OPC modules build their own checkout page, some options may not work, e.g. Bank list, Separate card payment, Separate BLIK payment and separation of credit payment methods. Please report such problems to the OPC module authors.

About

PayU plugin for PrestaShop 1.6, 1.7, 8 and 9

Resources

Security policy

Stars

70 stars

Watchers

36 watching

Forks

Releases

Used by

Contributors

Languages