Plugin - Redsys (Create custom order forms)

RSForm!Pro Redsys Payment Plugin

The RSForm!Pro Redsys Payment Integration Plugin allows you to add a new payment method to the existing Payment Package of RSForm!Pro.

This RSForm!Pro Redsys Payment Integration Plugin is commercial and needs to be purchased separately. You can buy it by accessing Customer Area > My memberships > Active Memberships > clicking the 'Buy Extra Plugins' button of your RSForm!Pro license. Also you will have to make sure that you install the Payment Package plugin first.
 
Downloading and Installing the plugin
 
Download

You can download the plugin by logging with your purchase user, then head to Downloads > My Downloads > RSForm!Pro - view all plugins and modules > RSForm!Pro Files > Plugins > "RedSys x.x Payment Plugin".

Install

In the backend of your Joomla! installation go to the Extensions > Install/Uninstall page, and install the plugin. Next thing is to publish the plugin, to do this go to Extensions > Plug-in Manager, search for the "System - RSForm! Pro RedSys Plugin" plugin and publish it.

 

Configuring the plugin

Configuring the Redsys payment gateway can be done from Components > RSForm!Pro > Configuration > Redsys tab:

  • Test Mode Yes / No
  • Test / Merchant Code - you'll need to add the trade number provided by your entity. As a generic number, you can use 999008881
  • Test / Terminal - Here you must put the terminal number provided by your entity. As a generic number, you can use 001
  • Test / Key (SHA-256) - a generic trade key for the test environment is: sq7HjrUOBfKmC576ILgskD5srU870gJ7
  • Tax Type: Percent (%) / Fixed Rate
  • Tax Value: Amount of tax. Total amount of the transaction must include this amount.
 

Important: when testing Redsys, sandbox credentials are automatically provided, though if you have custom ones for testing, feel free to adjust these as needed. Further information is available in the Redsys documentation.

 

How to use the Redsys plugin

After configuring the Redsys parameters from Components > RSForm!Pro > Configuration > Redsys tab, the actual payment details will only be sent to the Redsys payment processor if the user selects Redsys from the "Choose Payment" field before submitting the form.

The "Choose Payment" field is used in order to allow the users to choose their payment method. It displays the payment methods added to the form in either a Dropdown or Radio Group. It can be shown on the form (allowing the user to select his preferred payment method) or not (forcing the user to pay using the default payment method).

If you are using a single payment method and you need to hide the Choose payment field, this can be achieved by editing the field and setting to "No" the "Show in front-end?" option within the "Attributes" tab.

In order the Redsys payment method to be available within the Choose payment field, the Redsys payment field needs to be added in form.

 

Adding costs

In order to receive funds using RSForm!Pro and Redsys payment plugin, your form needs to include a cost. In order to add costs to your form you can use any of the following fields:

  • Single Product - Adds a single product to the form. For this type of field you can set up a caption, description and a price.
  • Multiple Products - Adds the ability to display multiple products to be purchased either in a Dropdown or a Checkbox. Its items need to be specified in the following manner: price | label (ex: 15 | T-shirt)
  • Quantity - Allows the user to choose the amount of products (simple or multiple).
  • Donation - Allows the user to type in the amount to be paid inside a standard Textbox.
  • Total - This field is used alongside the Donation, Single and Multiple Products fields. It calculates the total price to be paid.

Modifying Redsys variables through Scripts called after form has been processed

This process is similar to the already existing example regarding the PayPal parameters control. First you will need to get a new instance of the Redsys object, this is done with:

require_once JPATH_ADMINISTRATOR . '/components/com_rsform/helpers/redsys/redsys.php';
$RedSys = RSFormProRedSys::getInstance();

After this is done you will be able to override the parameters sent to RedSys using a similar syntax:

//return URL after a successful transaction:
$RedSys->args['DS_MERCHANT_URLOK'] = 'https://www.my-website.com/success';

//return URL after a failed transaction:
$RedSys->args['DS_MERCHANT_URLKO'] = 'https://www.my-website.com/failure';

The above example will include a success and failed return URLs. For more details on the available parameters, refer to the official RedSys API documentation.

27 May 2024
Version 3.1.3
  • Updated - Payments are now sorted in the 'Choose Payment' field according to the same order in the form.
04 Mar 2024
Version 3.1.2
  • Added - Joomla! 5 native compatibility - no longer needs the 'Behaviour - Backward Compatibility' plugin.
21 Feb 2023
Version 3.1.1
  • Fixed - In some cases the total sent to RedSys was missing 0.01
12 Jul 2022
Version 3.1.0
  • Updated - Payment fields will now be correctly placed in the 'Payment' group.
09 Jun 2021
Version 3.0.0
  • Updated - Joomla! 4.0 and RSForm! Pro 3.0 compatibility.
07 Apr 2021
Version 1.0.3
  • Fixed - In some cases the total was not being sent when a tax was being used.
25 Feb 2021
Version 1.0.2
  • Updated - Tax can now be shown when selecting this payment method.
09 Jun 2020
Version 1.0.1
  • Added - 'Test Mode' parameters: Merchant Code, Terminal and Key.
27 Apr 2020
Initial Release

Was this article helpful?

Yes No
Sorry about that

You Should Also Read

Plugin - Payment Package (Wire Transfer, PayPal) HOT

Plugin - Stripe (Create custom order forms) HOT

Plugin - eWAY (Create custom order forms) HOT

Plugin - iDeal (Create custom order forms) HOT

Plugin - Authorize.Net (Create custom order forms) HOT