Plugin - 2Checkout (Create custom order forms)

RSForm!Pro Stripe Payment Plugin
 

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

 
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 > "2Checkout".

Install

In the backend area go to the Extensions > Manager > Install page, and install the plugin. Next thing is to publish the plugin from Extensions > Plug-in Manager, search for the "RSForm! Pro - 2Checkout" plugin and publish it.

Configuring the plugin

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

  • Account Mode: Live / Sandbox - If you set this to Sandbox mode then no real payments will be made. Select Live to use your live account.
  • Sandbox Account Number - This is your 2Checkout Sandbox Account Number.
  • Secret Word - This is the Secret Word you've set in Account - Site Management. This is used to validate the authenticity of the IPN request when a callback is made.
  • Demo No/Yes - Using this setting, a demo=Y parameter will be sent to the 2Checkout shopping cart.
  • Tax Type Percent(%)/Fixed Rate
  • Tax Value
 
Important note!

The Approved URL found in the 2Checkout tab of the RSForm!Pro Configuration page, needs to be added in your 2Checkout account by heading to Account > Site Management tab.

 
How to use the 2Checkout plugin

After configuring the 2Checkout parameters from Components > RSForm!Pro > Configuration > 2Checkout tab, there are some additional steps that needs to be taken in order the payment process to work properly:

Making sure the form is sent to the payment processor

The payment details will only be sent to the 2Checkout payment processor if the user selects 2Checkout 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 2Checkout payment method to be available within the Choose payment field, the following payment related element has to be part of your form.

  • (Payment) 2Checkout - actual payment related element that will be included within the Choose Payment selection on your form.
 

Mapping form information to 2Checkout for card processing
 

In order to collect and send the user's information to 2Checkout you need to switch to Form Properties(while editing your form) > 2Checkout Configuration section and map the form 2Checkout fields with the corresponding RSForm!Pro form fields.

 

Note: After adding the above-mentioned fields to the form, you need to go to Form Properties > 2Checkout Configuration tab and map the 2Checkout fields with the RSForm!Pro fields, in order to be populated automatically with user-supplied data.

Note: when testing 2Checkout, besides the fact that you'll need a testing 2Checkout API Key, you'll have to use a testing credit card.

 
Adding costs

In order to receive funds using RSForm!Pro and 2Checkout 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 2Checkount 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 2Checkout object, which is done with:

    $2checkout = RSFormPro2Checkout::getInstance();

Then you can override parameters as follows, depending on your 2Checkout payment mode.

    $2checkout = RSFormPro2Checkout::getInstance();
    $2checkout->args['phone'] = '0123456789';

You can view the official 2Checkout documentation for a complete list of accepted parameters.

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.
25 Feb 2021
Version 1.0.2
  • Updated - Tax can now be shown when selecting this payment method.
24 Nov 2020
Version 1.0.1
  • Fixed - 2checkout sandbox account removed since they no longer use separate accounts.
24 Apr 2019
Initial Release

Was this article helpful?

Yes No
Sorry about that

You Should Also Read

Plugin - Payment Package (Wire Transfer, PayPal) HOT

Plugin - eWAY (Create custom order forms) HOT

Plugin - PagSeguro (Create custom order forms) HOT

Plugin - Stripe (Create custom order forms) HOT

Plugin - iDeal (Create custom order forms) HOT