Skip to content

Latest commit

 

History

History
228 lines (170 loc) · 15.6 KB

README.EN.md

File metadata and controls

228 lines (170 loc) · 15.6 KB

Wersja polska

PayU plugin for Prestashop 1.6, 1.7 and 1.8

If you have any questions or issues, feel free to contact our technical support.

Note: Plugin version 2.x supports PrestaShop versions 1.4 and 1.5, but is not developed any more.

Table of Contents

Features

The PayU payments Prestashop plugin adds the PayU payment option and enables you to process the following operations in your e-shop:

Plugin version 3.x supports PrestaShop versions 1.6 and 1.7

Feature PrestaShop 1.6 PrestaShop 1.7
Creating a payment order (with discounts included)
Capturing a payment order (when auto-capture is disabled)
Conducting a refund operation (whole or partial)
Displaying payment methods on Presta checkout summary page
Card payment as separate method
Card payment via widget on summary page
Payment retry for cancelled payments
Repayment
Multi-currency support
Payment method order
Promoting PayU Installments and PayU Later
Klarna payment as separate method
PayPo payment as separate method
Twisto payment as separate method
Present installment estimated value on product and listing page
Present installment estimated value in checkout view
Present installment estimated value in cart view

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

All instructions regard PrestaShop 1.6, for versions 1.7 corresponding options should be used.

Prerequisites

Important: This plugin works only with 'REST API' (Checkout) points of sales (POS). If you do not already have PayU merchant account, please register in Production or please register in Sandbox

The following PHP extensions are required: cURL and hash.

Installation

Option 1

recommended for users without FTP access to their PrestShop installation

  1. Download file payu_prestashop_plugin_X.Y.Z.zip from releases
  2. Go to the PrestaShop administration page [http://adres-sklepu/adminxxx].
  3. Go to 'Modules and Services' > 'Modules and Services'.
  4. Use 'Add a new module' option and point the archive containing the plugin (downloaded in step 1)
  5. Load the plugin

Option 2

recommended for users with FTP access to their PrestaShop installation

  1. Download file payu_prestashop_plugin_X.Y.Z.zip from releases
  2. Unzip locally downloaded file
  3. Upload all unzipped files from your computer to modules/payu catalog of your PrestaShop installation.

Upgrade

  1. Update plugin files according to Installing
  2. Go to do 'Modules and Services' > 'Modules and Services' - automated upgrade will be performed if required
  3. Go to Advanced Parameters > 'Performance' and click 'Clear cache'

Configuration

  1. Go to the PrestaShop administration page [http://adres-sklepu/adminxxx].
  2. Go to 'Modules and Services' > 'Modules and Services'.
  3. Search and select 'PayU' and click 'Configure'.

Integration method

Parameter Description
Bank List Yes choosing the PayU payment method will be possible on checkout page when selected Pay by online transfer
No after placing an order on PrestaShop, you will be automatically redirected to PayU.
Do not enable these options if you are using PrestaShop and OPC module more info.
Payment method order enables custom payment method ordering more info
Card payment as separate method sets card payment as separate method more info
Card payment widget renders a widget on Presta summary instead of redirecting to PayU more info
BLIK payment as separate method sets BLIK payment as separate method
Sandbox mode Yes - transactions will be processed on PayU Sandbox environment
No - transactions will be processed on PayU production environment
Save logs Specifies whether the plugin will save information to logs.

POS Parameters

For each currency defined in Presta please configure the below parameters (separately for sandbox and production environment).

Parameter Description
POS ID Unique ID of the POS
Second Key MD5 key for securing communication
OAuth - client_id client_id for OAuth
OAuth - client_secret client_secret for OAuth

Payment status mapping

Mapowanie statusów płatności w PayU na statusy w skepie PrestaShop

Name PayU payment status Default value in Presta
Started - status after placing order PayU payment started
Complete status COMPLETED Payment accepted
Canceled status CANCELED PayU payment canceled

If the option Control of status changes is enabled for status "Complete" and "Canceled" it is possible to switch only from the status "Pending" and "Waiting For Confirmation"

More on features

Payment method order

Applies only to Payment methods displayed on Presta checkout summary page switched to Yes To set the order of the payment method icons enter payment method values separated by comma. Payment method values.

Multi-currency

POS in PayU system has only one currency defined. Therefore to accept payments in more currencies, POS for each currency has to be separately configured. Error ERROR_INCONSISTENT_CURRENCIES means an unsupported currency by POS. Contact with PayU service is required when approving the payment option in a different currency for the sandbox mode and a separate agreement for the production mode.

Payment method display

When Payment methods displayed on Presta checkout summary page parameter is set to Yes payment method icons will be displayed directly within PrestaShop page when 'PayU with PayU' button is clicked. The icons are displayed basing on POS configuration.

payment_methods

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

Card payment

If Card payment as separate method option is enabled, a method named Pay by card will be displayed in PrestaShop checkout process.

If Payment methods displayed on PrestaShop checkout summary page option is set to Yes then Pay by card will be displayed only if card payments are configured on your POS ID. If this option is set to No then Pay by card will be always visible but may fail if card payments are not configured.

![payment_methods][img6]

Card payment widget

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

If Card payment as separate method and Payment methods displayed on Presta checkout summary page are set to Yes then the Pay by card option will render a widget to collect card data instead of redirection to PayU card form page.

![widget][img5]

Payment retry

This feature enables the payer to create a new payment for the same order if the previous payment was not successful.

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

Repayment allows to create many payments in PayU for a single PestaShop order. The plugin will automatically collect the first successful payment, all other will be canceled. From user point of view, repayment is possible:

  • by clicking a link in the order confirmation email
  • in order details

retry_payment

All PayU payments created for a PrestaShop order are displayed on Order screen in PrestaShop admin panel.

Promote credit payment methods

Plugin version 3.0.10 introduced functionality of promoting credit payment methods. Functionality is enabled by default. It can be deactivated using "Promote credit" switch in admin panel. Support for given functionalities has been described in Features section.

Presenting credit widgets is dependent on gateways availability for given point of sale (POS). Plugin automatically checks whether "ai", "dpt", "dpp" or "dpkl" gateways are enabled. If used POS doesn't have credit agreement activated functionality will not work, and widget presentation will be supressed (even if flag in admin panel is enabled).

Presentation of estimated installment amount depending on PrestaShop version

PrestaShop Version Category How it looks
1.7 Products listing
1.7 Product page
1.7 Cart
1.7 Promote credit payment methods
1.7 PayPo payment as separate method
1.7 Klarna payment as separate method
1.7 Twisto payment as separate method
1.6 Products listing
1.6 Product page

Presentation of estimated installment amount after clicking "Installment from:"

Plugin uses newest version of "miniInstallment" component that comes with PayU Installments - best practices package, that can be found in official documentation.

Popup with estimated installment plan looks as below:

Known issues

PrestaShop 1.6 and OPC module

In case of using OPC module (by X13), you have to disable Bank List option. Due to fact that OPC module builds its own checkout page, options Card payment as separate method, BLIK payment as separate method do not work and separation of installment methods.