Prestashop

Summary

The main features of this module are:

Prestashop versions compatibility:

Compatibility is not guaranteed if there are installed modules that modify the normal checkout flow.

Install

You can install Gestpay module for Prestashop as usual, by searching for it in the Modules directory and by clicking on Install.


Otherwise you can browser the plugin from Prestashop Addons directory.

Configuration

Gestpay has many options avaliable; you can access the module configuration by clicking on Modules > Modules & Services > Installed Modules. Here, find Gestpay and click on Configure.

All the customizable settings are shown:



Let’s discuss the parameters and their options.

Parameter Decription
Shop Login The shop login code assigned by Gestpay. Note: that the test shop code is different from the production shop code.
Platform The service version you choose to use (Starter, Professional or Unlimited)
Enable test mode In test mode, all requests are sent to Gestpay test environment where no money is involved. When your setup is done, you can switch to production environment.
Enable payment page localization When this switch is enabled, the customer’s language is passed as a parameter to Gestpay, that will translate the payment page accordingly. Note: Check that the language parameter is enabled in Gestpay backoffice.
Enable iframe payment Enables the payment form via iframe, so that the payment is handled securely.
Enable tokens By enabling this option together with the iFrame solution, the plugin allows to pay with a token instead of a credit card. This token is a secure representation of the credit card that will be saved inside the database.
Use Sales API Allows to manage in the orders page all the operations on the transaction, without accessing Gestpay backoffice.
Sales API automation Refunding and Cancelling operations can be performed directly from the order page, without accessing Gestpay backoffice.
Test connection Click here to check if the connection between your server and Gestpay is correctly configured.
Remove data on uninstall When uninstalling this module, remove tables, transactions and settings from the database
Enable module debugging log Enables logs on module operation. Activate only if requested by the customer care.

Transactions List

See all transactions and their status by clicking on Trnsactions Log.


Gestpay Backoffice configuration

Access your merchant back-office (test environment, production environment) to set up Gestpay.

To configure the plugin:

Set up response urls

Go to Configuration > Environment > Response Address.


<your domain>/modules/gestpay/remote/validation.php
<your domain>/modules/gestpay/remote/s2s.php

The plugin shows these values in the URL section:


Setup IP Address

In Configuration > Environment > IP addresses you must insert the server’s IP address.

The plugin shows this value in the URL section, see last image for this.

The IP address shown here might be incorrect; please verify with your hosting service the right external IP.

For cloud hosted websites, more info can be found here.

Trick: you can see what IP Gestpay observes, by going in Payment Page > Auto Test. Clicking on the last call, assuming you have done at least one call, you can see the IP address.

Configuring Gestpay - Payment Parameters

The payment page configuration depends on the Platform you choose above. There are two main cases:

Parameters can be found in the Merchant Back-Office, by clicking on Payment Page > Fields & Parameters.

To activate a parameter, open the dialog box and check the Parameter checkbox.

The follwing is an example for the PaymentTypes parameter, the others follow the same logic:


Note: not all parameters are editable.

Once you have applied the configuration, remember to click on the Publish button at the top of the page.

Redirection to Gestpay Payment Page

In order to pay with the Payment PAge, the fields that must be passed are:

iFrame and tokens

The setting enable iFrame payment activates an integrated payment page in Prestashop, that allows a secure trasmission of the credit card. The merchant will never see the credit card, at any moment.

If at purchase time the user wants to save the credit card on the website, it will be saved as a token, a non-sensitive datum that can be stored in Database without being PCI compliant, thus enabling one-click payments.

By activating Enable tokens in the payment page the buyer will see a form to insert the credit card:


At the end of the transaction, if the customer has decided to save his credit card in the shop, next payments will be done without inserting any credit card number and with just one click:


When the credit card expires, the user will see again the iframe form.

To enable iFrame, Gestpay customer support will create a new NO DISPLAY page with its own set of parameters.

Contact ecommerce@sella.it for help.

The configuration of fields & parameters is the same of above.

use of Tokens

If you enable the Token mode, enable the parameter Token Request.

For these three parameters:

you must also check the Web Service Response checkbox.

Sales API

with the Sales API, you can manage transactions and authorization/reimbusements directly from the orders page.

By activating the Sales API setting, in Orders Management you’ll see a new view with all transaction info:


From this view you can:

Settling a transaction is required when there is separation between authorization and settlement (again, see M.O.T.O. for more info).

You can also refund a transaction, until the eventual delete of the transaction. Insert the amount to refund in the textbox and click on Refund. The operation is real-time.

In case the setting Sales API automation is active, some operations on the order will automatically generate refunds in Gestpay. For example:


Troubleshooting

Error Solution
The payment button doesn’t show Verify the list of transactions in the module configuration page. In case you see Error 1142 (invalid IP address) configure the IP address as described above.
At the end of the payment the order is not inserted in the system There may be different causes:
- The Prestashop core has been modified
- The module Php Suhosin is installed; for security reasons this module truncates GET parameters, avoiding a correct communication with Gestpay. Modify the parameters max_totalname_length and max_value_length