Skip to content

About

PayU Payment Gateway for WooCommerce

Resources

Security policy

Stars

50 stars

Watchers

24 watching

Forks

Latest commit

 

History

255 Commits

Folders and files

Repository files navigation

Wersja polska

PayU Payment Module for WooCommerce

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

Requirements

Note: This module works only with REST API POS type.

If you do not have a PayU merchant account register a production account or register a sandbox account

The following PHP libraries are required: cURL and hash.

Installation

Use automatic installation and activation available in the Wordpress admin panel. Look out for PayU GPO Payment for WooCommerce.

Payment methods

The plugin offers the following payment methods:

Method Blocks Description
PayU - standard ✅ payer will be redirected to PayU's hosted payment page where any available payment type configured on your POS can be chosen
PayU - bank list ✅ payment type list will be displayed, depending on chosen type the payer will be either redirected directly to the bank or to PayU's hosted payment page
PayU - payment card ✅ payer will be redirected to PayU's hosted card form where credit, debit or prepaid card data can be securely entered
PayU - secure form ✅ a secure form collecting credit, debit or prepaid card data will be displayed
PayU - Blik ✅ payer will be redirected to Blik's page
PayU - Google Pay ✅ payer can use their saved cards in Google Pay wallet directly on the checkout page
PayU - Apple Pay ✅ payer can use their saved cards in Apple Pay wallet directly on the checkout page
PayU - installments ✅ payer will be redirected to installment payment form
PayU - Klarna ✅ payer will be redirected to Klarna payment form
PayU - Twisto ✅ payer will be redirected to Twisto payment form
PayU - Twisto pay in 3 ✅ payer will be redirected to Twisto pay in 3 payment form
PayU - PayPo ✅ payer will be redirected to PayPo payment form
PayU - PragmaPay ✅ payer will be redirected to PragmaPay payment form (only for business clients)

Payment method remarks

  • Methods PayU - standard and PayU - bank list enable payments of any type and differ only with the way the payment type is chosen. Should not be configured both at once.
  • Methods PayU - payment card and PayU - secure form enable card payments and differ only with the way the card data is entered. Should not be configured both at once.
  • In case PayU - bank list method is switched on, the following payment types are removed from the list: cards if PayU - payment card or PayU - secure form is on, Blik if PayU - Blik is on, installments if PayU - installments is on, Klarna if PayU - Klarna is on, Twisto if PayU - Twisto is on, PayPo if PayU - PayPo is on, PragmaPay if PayU - PragmaPay is on, Apple Pay if PayU - Apple Pay is on.
  • PayU - secure form method requires the shop to be available via HTTPS (for local tests, the address should be http://localhost)
  • PayU - Google Pay method requires providing Google Merchant ID. To obtain the identifier, you need to verify your shop in Google, following the instructions.
  • PayU - Apple Pay method requires the domain to be registered in Apple. To register the domain follow the instructions.
  • Even though PayU - payment card, PayU - secure form, PayU - Blik, PayU - installments, PayU - Klarna, PayU - Twisto, PayU - PayPo and PayU - PragmaPay are on, they may be not visible in case they are not configured on your POS in PayU system or the amount is outside min-max range for the given payment type.

Configuration

Global configuration

Global configuration is available in the main menu as PayU Settings

POS parameters:

Parameter Description
POS ID POS (point of sale) ID in PayU system
Second key MD5 Second key (MD5) in PayU system
OAuth - client_id OAuth protocol - client_id in PayU system
OAuth - client_secret client_secret for OAuth in PayU system
Sandbox - POS ID POS (point of sale) ID in Sandbox
Sandbox - Second key MD5 Second key (MD5) in Sandbox
Sandbox - OAuth - client_id OAuth protocol - client_id in Sandbox
Sandbox - OAuth - client_secret client_secret for OAuth in Sandbox
  • In case of using more than one currency, there will be a separate configuration for each available currency - more information in Multicurrency section
  • By default, each payment method uses global POS parameters

Other parameters - applicable to all modules:

Parameter Description
Default order status The status that the order will have after the payment process has started. Possible values On hold or Pending payment - pending.
According to the WooCommerce documentation, when warehouse management is enabled for On hold status, the number of products in the warehouse will be reduced and restored when the order changes to Canceled status, for Pending payment - pending status, the inventory levels will not be changed.
Order status for failed payment The status that an order will receive after an unsuccessful payment. Possible values Canceled or Failed. In the case of Failed it is possible for the buyer to retry the payment.
Enable retrieve status on Thank You page On the Thank You page, when the payment does not have a final status, the status is checked cyclically (10 times every 4 seconds). If the status is Failed, the buyer can retry the payment.
Enable repayment Allows the payer to try again payment regardless of status. Before using this option please check Repayment.

Payment method configuration

Parameters available for every payment method:

Parameter Description
Enable / Disable Enables payment method.
Name Name displayed during checkout.
Sandbox mode If enabled, payments are done in Sandbox environment using Sandbox settings.
Use global settings If not enabled, you need to provide specific settings for given payment method.
Description Payment method description displayed during checkout.
Enable for shipping method Payment method may be enabled only for specific shipping methods. In case no shipping method is provided, the payment method is enabled for every shipping method.
Virtual orders Payment method will be enabled for virtual orders

Parameters available for PayU - bank list:

Parameter Description
Own ordering To use your own ordering of payment types, you need to provide a comma-separated list of payment types codes from PayU system. Payment types list.
Show inactive payment methods In case a given payment type is not active it is still displayed, but greyed out, otherwise not displayed.

Parameters available for PayU - Google Pay:

Parameter Description
Google Merchant Id Merchant identifier in Google. You need to verify your shop in Google, following the instructions.
Google Merchant name Merchant name is rendered in the payment sheet.

Parameters available for PayU - Apple Pay:

Parameter Description
Apple Pay Domain Domain name registered in Apple. To register the domain follow the instructions.
IMPORTANT: The domain must match the checkout page domain, otherwise Apple will reject the payment request.
Apple Pay Display Name Apple Pay display name. A string of 64 or fewer UTF-8 characters containing the canonical name for your store, suitable for display.

FAQ

If you have issues with functionality, first read the Frequently Asked Questions page.

Multicurrency

There are two ways to handle multicurrency:

WPML Plugin

For every currency added to WPML plugin you can find separate point of sale configuration.

Filters

The plugin provides two filters, that allow to add support for multiple currencies during payment

Filter name Description Type
woocommerce_payu_multicurrency_active Should multicurrency service be enabled bool
woocommerce_payu_get_currency_codes List of currencies ISO codes in ISO 4217 standard e.g. "PLN". array

Example:

function payu_activate_multicurrency($active)
{
    return true;
}

function payu_set_currency_list($currencies)
{
    return ['PLN', 'EUR'];
}

add_filter('woocommerce_payu_multicurrency_active', 'payu_activate_multicurrency');
add_filter('woocommerce_payu_get_currency_codes', 'payu_set_currency_list');

Notes:

  • When the WPML plugin is installed and filters are configured, the availability of currencies is checked in WPML then through the filters.
  • Separate point of sale configurations are available when number of currencies is greater than 1.

Filter hooks

Change order status

Filter Name Description Type Parameters
woocommerce_payu_status_cancelled Order status for CANCELED notification string Order

Repayment

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 WooCommerce 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
  • by clicking "Pay with PayU" link in Actions column in order list
  • by clicking "Pay with PayU" link over order details section

Credit widget

Plugin provides seamless integration of credit widget. It's responsible for presenting minimal installment amount for a given product. Additionally, after clicking on the widget, information on available repayment plans is presented, as well as a list of deferred payment methods (“buy now, pay later”). Functionality is enabled by default. It can be deactivated in administration panel (WooCommerce->PayU settings). Integration points of a widget have been described in a table below.

Checkbox Installments widget Description Presentation
Enabled on product listings
Presents "installment from" widget on all product listings.
Prezentacja widgetu
Enabled on product page
Presents widget on product page.
Prezentacja widgetu
Enabled on cart page
Presents widget on cart page - relates to a total cart amount and shipping costs.
Prezentacja widgetu
Enabled on checkout page
Presents widget on checkout page - relates to a total cart amount and shipping costs.
Prezentacja widgetu

Widget is presented only for supported currencies and only for products or carts, which amount is within the allowed amount range for installment or deferred payment methods.

Additionally, in the administration panel, it is possible to limit the types of payments to be displayed in the credit widget.

Emails

The plugin does not send any additional emails and does not interfere with any mailing process.

In case repayment is configured, the mail confirming order placement is enhanced with information about the possibility to pay the order: If you have not yet paid for the order, you can do so by going to the website.

About

PayU Payment Gateway for WooCommerce

Resources

Security policy

Stars

50 stars

Watchers

24 watching

Forks

Releases

Packages

Used by

Contributors

Languages