osCommerce

This article shows you the procedure to enable PayU on your osCommerce website.

osCommerce is a platform developed in PHP that ease the creation of an online store. To let your clients pay with PayU from your website, you need to install the plugin for osCommerce, which integrates PayU Latam as a valid payment gateway. For more information about osCommerce, refer to their official website.

Prerequisites

  • You need an active account in PayU Latam.
  • Having installed osCommerce version 2.3.
  • Having the PayU’s osCommerce plugin downloaded and stored in an accessible location. Click here to download it.

Installation

Follow the next procedure to install the plugin on your website.

  1. Unzip the plugin file in a location of your choice. From now on, we will refer this location to [PLUGIN_PATH].
    In this path, you find the folder oscommerce-plugin-1.0.

PrintScreen

  1. Either using FTP or logging in as an Administrator to the server where osCommerce is installed, include the plugin files in the server as follows:
  • In the server path /[server]/apache/[publication_path]/oscommerce/catalog, copy the plugin files confirmation_payu.php and response_payu.php. These files are located in the path [PLUGIN_PATH]\oscommerce-plugin-1.0\oscommerce-payu-latam-1.0\catalog.

PrintScreen

  • In the server path /[server]/apache/[publication_path]/oscommerce/catalog/includes/languages/english/modules/, copy the plugin file ‘payu_latam.php located in the path [PLUGIN_PATH]\oscommerce-plugin-1.0\oscommerce-payu-latam-1.0\catalog\includes\languages\english\modules\payment.

    PrintScreen
    Repeat this step for Spanish and Portuguese if you have them installed in your osCommerce website. These files are located in the paths:

    • ES: [PLUGIN_PATH]\oscommerce-plugin-1.0\oscommerce-payu-latam-1.0\catalog\includes\languages\espanol\modules\payment
    • PT: [PLUGIN_PATH]\oscommerce-plugin-1.0\oscommerce-payu-latam-1.0\catalog\includes\languages\portugues\modules\payment
  • In the server path /[server]/apache/[publication_path]/oscommerce/catalog/includes/modules/payment/, copy the plugin file ‘payu_latam.php located in the path [PLUGIN_PATH]\oscommerce-plugin-1.0\oscommerce-payu-latam-1.0\catalog\includes\modules\payment. This file is not the same file than the one mentioned before.

PrintScreen

  1. In the osCommerce admin panel, expand the Modules menu in the left panel and select Payment option.

PrintScreen

  1. In the Payment section, click Install Module button located at the top right corner.

PrintScreen

  1. Find the Payu Latam plugin and click it. Then, click Install Module button in the right panel.

PrintScreen

  1. After installing the plugin, the list of installed modules of the Payu Latam plugin appears in the right panel.

PrintScreen

Configuration

  1. In the Payment section, select the Payu Latam payment method and click the Edit button in the right panel.

PrintScreen

  1. The following configuration form appears:
PrintScreen

Configure it using the information of your PayU account as follows:

Field Value
Enable / Disable Select True to enable the payment gateway in osCommerce.
Merchant ID ID of your commerce in PayU Latam
Account ID ID of the PayU account according to the country where you want to sell.
API key Unique key of your commerce, you can find this key in the PayU module.
Gateway URL Gateway URL.
For test, you can use https://sandbox.gateway.payulatam.com/ppp-web-gateway and for production https://gateway.payulatam.com/ppp-web-gateway/
Transaction Mode Select Test if you want to process in the Test environment. Otherwise, select Live.
Response page URL of the response page.
By default, the URL is http://your.domain.com/yourOscommerceFolder/catalog/response_payu.php, you must replace http://your.domain.com with your site’s domain.
Confirmation page URL of the confirmation page.
By default, the URL is http://your.domain.com/yourOscommerceFolder/catalog/confirmation_payu.php, you must replace http://your.domain.com with your site’s domain.
  1. Save the changes using the button at the bottom of the panel.

  2. Finally, expand the Localization menu and click Order Status. Verify that the order status were created according to the installed languages (English, Spanish, and Portuguese) in your osCommerce website.

PrintScreen

The valid states are:

  • For English: Approved, Rejected, Failed, and Pending.
  • For Spanish: Aprobada, Rechazada, Fallida, and Pendiente.
  • For Portuguese: Aprovado, Recusada, Falha, and Pendente.

At this point, your customers can pay with PayU Latam when they do the checkout in the osCommerce’s shopping cart.

Last modified June 24, 2022: clon issue (d73e43fe)