Magento is an e-commerce platform built on open-source technology that provides you with a flexible shopping cart system with control over their online store’s Look and Feels, content, and functionality.

PayU gateway Magento Extension is a connector between your Magento store and the PayU payment gateway. This enables you to process and collect payments while selling products from your website.

This section describes how to install and configure the PayU plugin for Magento v2.x on your Magento-powered website for payments through credit cards, debit cards, Net Banking, and Saved cards.

The plugin will enable payment for your customers to use PayU platforms.

👍

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 the PayU plugin and then configure the Magento v2.x settings.

Install plugin

Download the PayU plugin

PayU Plugin VersionSupported PHP VersionsPayUI Plugin
Download Link
Magento v2.4.xPHP 7.4, 8.0, 8.1, 8.2GitHub Location
Magento v2.3.xPHP 7.3, 7.4, 8.0GitHub Location

Procedure

To install the PayU plugin for Magento:

  1. Download the PayU Plugin for Magento to the Magento version you use from the Download the PayU plugin table:
  2. Extract the archive that you have downloaded.
  3. Upload the PayUIndia folder that you find after extracting the archive to the app/code folder under Magento.

Note: If the code folder does not exist under the /app folder, create a code folder.

  1. Disable the cache:
    • Navigate to the Magento Admin panel > System > Cache Management.
    • Select all the cache types from left pane.
    • Select Action and then select Disable from the drop-down list.
    • Click Submit.
  2. Execute the following Magento commands:
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
  1. Configure the module in the Magento Admin panel. For more information, refer to Configure Magento 2.4.

Configure Magento v2.4

After installing PayU plugin for Magento v2.4, you need to configure Magento installation as described in this section.

To configure the Magento v2.4 environment for PayU:

  1. Log in to the Magento admin panel.

  2. Navigate to Store > Configuration > Sales > Payment Methods.

  3. Expand the Payu menu.

    The Configuration page with the Payu tab selected is displayed, similar to the following screenshot:

Note: If the Payu tab is not displayed, clear the cache as described in the Install Plugin for Magento v2.x.

  1. Enter the configuration details as described in the following table:
FieldDescription
EnabledSelect Yes from the drop-down list to enable the module.
Account TypeSelect PayUBiz for the account type.
EnvironmentSelect any of the following gateway environments from the drop-down list to which customer payment details will be redirected.
** Sandbox: This is the Test environment and no actual fund transfer will take place.
** Production: This is the Live environment. Use this value only
If you select Sandbox in Transaction Mode, then use the following credentials:
- Merchant id: oZ7oo9
- Salt: UkojH5TS |
Merchant KeyEnter your production account key for the Production environment.
Salt KeyEnter your Salt for the Production environment. For more information, refer to Generate Merchant Key and Salt.

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

  1. Click Save Config at the top-right corner.

📘

Note:

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

The configuration for the PayU plugin is complete and your customers can make payments through PayU.

📘

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 Magento integration

When integrating PayU with Magento v2.4, you may sometimes encounter some issues. This section describes the recommended steps to troubleshoot any issues you face while integrating with Magento.

PayU Plugin is not working

Payments are not reflected

If you had switched to Magento Developer mode before starting the integration with the PayU plugin, you might not see the payments made by customers reflected if you did not switch to the Magento Production mode. For more information, refer to Magento Configuration Guide.

Magento upgrade issues

After you upgrade from a previous version of Magento, you cannot see the new features of Magento.

You need to clear the cache and refresh your Magento cache:

  1. Clear the Magento cache. For more information, refer to Magento Documentation
  2. Refresh the Magento cache by executing the following commands:
php bin/magento setup:upgrade
php bin/magento cache:flush
php bin/magento setup:static-content:deploy
  1. Recompile the Magento installation using the following command:
php bin/magento setup:di:compile

📘

Note:

For any other issues you face with Magento v2.4, refer to Magento Troubleshooting.