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. The price of the plugin is: 15 EUR.
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 Plugin for Joomla! 3.x".

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 "RSForm! Pro - Redsys" 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)
  • 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 AuthorizeNet vars 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.colmenarviejo.com/success';
 
//return URL after a failed transaction:
$RedSys->args['DS_MERCHANT_URLKO'] = 'https://www.colmenarviejo.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.

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