WooCommerce

WooCommerce is an open-source e-commerce plugin for WordPress. It is designed for small to large online merchants using WordPress to set up your e-commerce site easily. PayU India is a gateway plugin that extends WooCommerce, allowing you to take payments through PayU. You can easily take credit card payments and direct payments through any of the associated banks.

When the order goes through, the customer is taken to PayU to make a secure payment. You will not require an SSL certificate or PCI-DSS certification on your site. After your customer makes a payment on the PayU payments page, the order is confirmed, and the user is taken to the page you would like to redirect.

Requirements

  • Merchant Account on WooCommerce website
  • PayU Plugin for WooCommerce version 5.5.2

👍

Before you begin:

Register for a account with PayU before you start integration. For more information, refer to Register for a Merchant Account.

Video tutorial

The following video describes how to install PayU plugin and then configure the WooCommerce settings.

Install plugin

You can install the PayU WooCommerce plugin by either using the WordPress Plugin Installer wizard or manually.

📘

Notes:

  • PayU supports WooCommerce version 3.x or later and you need to use the PayU plugin based on the WooCommerce version you are using. Use the PayU plugin according to the WooCommerce version as listed in the Download the PayU Plugin for WooCommerce subsection.
  • WooCommerce does not have built-in multi-currency feature. Hence it is important to use separate multi-currency plugin for WooCommerce. This plugin uses currency present in Order.

Download the PayU plugin

PayU Plugin VersionSupported WooCommerce VersionsPayUI Plugin
Download Link
Woocommerce v4.18.0, 8.1, 8.2,8.3GitHub Location
Woocommerce v3.83.8, 4.1, 5.1, 7.1GitHub Location

Procedure

Install the PayU Plugin using Installer

To install the PayU plugin using the WordPress installer:

  1. Login to the WordPress Admin panel.

  2. Navigate to Plugins >Add New.

  3. Click Upload Plugin.

    The Add Plugins page is displayed in WordPress.

  1. Choose the PayU plugin zip that you downloaded earlier (as required in Download the PayU plugin section) from the file chooser.
  2. Click Install Now.

Install Manually

  1. Unzip the PayU plugin zip that you downloaded (as required in the Download PayU Plugin section) earlier.

    The contents of the PayU plugin zip are extracted to the  folder and folder name is based on the plugin version:

  • Version 5.5.2: WooCommerce_v552_MultiCurrency_PayUBiz folder.
  • Version 3.8.1: WooCommerce_v381_MultiCurrency_PayUBiz folder.
  1. Copy the folder created in Step 1 to the clipboard and paste or upload it to <wordpress root>\wp-content\plugins folder, where <wordpress root> is the location where WordPress is installed.
  2. Log in to the WordPress Admin panel.
  3. Navigate to Plugins.
  4. Search for the PayU plugin and activate the plugin.

Configure WooCommerce Settings

To configure WooCommerce Settings after installing the PayU plugin:

  1. Log in to WordPress as admin.

  2. Open WooCommerce Settings.

  3. Select the Payments tab.

  4. Click the PayUBiz toggle button to enable PayU as payment gateway.

    The PayUBiz is enabled as in the following screenshot:

  1. Click Manage.

    The PayUBiz payment page is displayed.

  1. Select the Enable PayU check box to enable the module.
  2. Enter a description in the Description text area that must be displayed on your checkout page.
  3. Select any of the following gateway environment from the Gateway Mode drop-down list to which customer payment details will be redirected to.
    • Sandbox: This is the Test environment and no actual fund transfer will take place.
    • Production: This is the Live environment. Use this value only for your website in production. Payments sent in the production environment will get processed.

Note: PayU suggests you use Sandbox for testing to validate the payment.

  1. Enter the parameters for each currency if you had configured as multi-currency. You can configure upto 10 currencies. For example, to configure Indian Rupees as the first currency:
    • Enter INR in the Currency 1 field.
    • Enter your merchant key in the PayU Key for Currency 1 field. If you had selected Sandbox in Step 8, enter your Test environment key as key.
    • Enter your Salt in the PayU Salt for Currency 1 field. If you had selected Sandbox in Step 8, enter your Test environment Salt as Salt.

Reference: For more information on how to generate the Key and Salt, refer to any of the following:

Note: You must enter INR (all in capitals) in the Currency 1 field to avoid any error messages when the customer checks out on your website.

  1. Select the Verify Payment check box (after the currency fields) to verify the payment.
  2. Select the page from the Return Page drop-down list. The My Account option is selected by default and the selected return page is displayed after payment response.

Note: You may create a custom page and select from this drop-down list. However, the custom page must contain appropriate WordPress / WooCommerce codes to show custom messages. Refer to the WooCommerce Development Guide for custom pages.

  1. Click Save Changes.

    Your customer will get PayUBiz as a payment option during the checkout process. 

A page similar to the following screenshot is displayed after the customer clicks **Place Orde**r on your shopping page.

Note: After configuring with the PayU Test environment, use the test card details to test the payment. For more information, refer to Test Cards, UPI ID and Wallets.

📘

Note:

PayU recommends this step to reconcile with PayU’s database after you receive the response. Verify the transaction details using the Verification Payment API. For API reference, refer to Verify Payment API..

Troubleshooting WooCommerce integration

When you are integrating PayU with WooCommerce, at times you may encounter some issues. This section describes the recommended steps to troubleshoot any issues which you face while integration with WooCommerce.

Payment Page is showing only card payment mode

Uninstall and delete the current plugin that you had installed earlier and install the PayU WooCommerce v3.8.2 plugin. Also, ensure that you have configured the following fields. For more information, refer to refer to Configure WooCommerce Settings.

  • Currency 1 = INR
  • PayU Key for Currency 1 = Your merchant key
  • PayU Salt for Currency 1 = Your merchant salt
  • Ensure the Verify Payment checkbox is selected.
  • Other currency and key/salt fields remains blank.

PayU is not appearing as a payment method or not working

📘

Note:

The Salt that you get from PayU is case-sensitive. It is recommended to copy the Salt from the Dashboard and paste it in PayU Salt for Currency 1 field of the PayUBiz payment page. For more information, refer to Configure WooCommerce Settings.

  • Check whether the PHP curl extension is installed and activated.

Unable to process your request

An error message similar to the following screenshot is displayed if the value entered in the Currency 1 field of the PayUBiz payment page is not in capital letters or blank. For more information, refer to Configure WooCommerce Settings.

Incorrect return page is displayed after payment

You may have not configured the Return Page field on the Payments tab during configuration. For more information, refer to Configure WooCommerce Settings.

📘

Note:

For any other issues you face with WooCommerce, refer to the WooCommerce Troubleshooting documentation.

SI or Recurring Payments with WooCommerce

PayU does not support recurring payments with WooCommerce. PayU recommends you to use the Web Checkout integration. For more information, refer to Recurring Payments Integration.

International payments with WooCommerce

PayU does not support international payments or Dynamic Currency Conversion with WooCommerce. PayU recommends you to use the Web Checkout integration or use separate multi-currency plugin for WooCommerce.

📘

Reference:

For more information, refer to Internation Payments.