Skip to content

    Magento 2

    Overview

    The Nexi XPay payment extension for Magento 2, allows you to integrate the XPay payment gateway without further implementations on your site.

    It manages the transfer of the customer from your E-commerce site to the secure Nexi environment and vice versa.

    The customer stays on your E-commerce site until checkout, then is redirected to the XPay gateway to make the payment.

    Installation

    The Nexi XPay plugin for Magento 2 is available for free at the following link Nexi plugin, from which you can check compatible versions. The module is compatible with Magento Open Source (Community Edition) and Magento Commerce (Enterprise Edition).

    You can install the extension via composer or FTP.

    Installation via composer

    Before proceeding, verify that Composer is installed in your environment. Below is the list of commands to run for installation:

    • Install the plugin.

      composer require iplusservice/xpta

    • Enable the plugin.

      bin/magento module:enable IPlusService_XPTA

    • Run the update command.

      bin/magento setup:upgrade

    • Clear the cache.

      bin/magento cache:flush

    Installation via FTP

    • Download the plugin directly from the Marketplace and upload the .zip file to the app/code/IPlusService/XPay folder (if these folders are not present you will need to create them)

    • Unzip the file and enable the plugin.

      bin/magento module:enable IPlusService_XPay

    • Run the update command.

      bin/magento setup:upgrade

    • Clear the cache.

      bin/magento cache:flush

    The installation phase is complete, proceed with the configuration.

    Configuration

    Here are the indications to correctly configure the Nexi XPTA plugin:

    1. Login to the Magento admin panel.
    2. In the left navigation bar, select Stores > Configuration.
    3. In the new menu on the left, select Sales > Payment methods > Nexi XPTA.
    4. Proceed with the configuration of the module:
    ConfigurationDescription
    API KeyCode provided by Nexi to the seller.
    ToggleEnable the Nexi XPTA payment module
    AccountingThe field identifies the collection method that the merchant wants to apply to the single transaction, if valued with:
    • Immediate transaction if authorized is also cashed without other interventions by the operator and without considering the default profile set on the terminal.
    • Deferred the transaction if authorized is managed as defined by the terminal profile.
    Timeout Pay-By-LinkMaximum time in hours for which the Pay-By-Link will be usable.
    Enable/Disable TEST modeEnables or disables test mode. Register in the test area to receive your credentials.
    Enable OneClickEnable OneClick mode.
    Enable 3D secure 2.0The new 3D Secure 2.0 protocol adopted by the main international circuits (Visa, MasterCard, American Express), introduces new authentication methods, able to improve and speed up the cardholder's shopping experience.

    Test and Production

    It is highly recommended to test the plugin in a test environment, before entering the production codes.

    You can get your test credentials (API Key) in the test environment. In the area, there will also be test cards that can be used to execute successful and negative transactions. At this stage it is necessary to verify that the orders are created correctly, also checking the details of the orders.

    Transition to production

    To carry out the transition to production it is necessary to create the production credentials (API Key). To generate the new credentials follow these steps:

    1. Log in to Nexi Business.
    2. Sign in to the XPay Web Back Office.
    3. In the Admin section click on APIKey.
    4. Click on Add new APIKey.
    5. Once the terminal has been selected, click on Add to generate the production API Key.

    Once the API Key has been created, the module configuration must be updated as below:

    1. Log in to the Magento back office.
    2. In the payment configuration section click on Nexi.
    3. Disable the TEST mode and enter the API Key generated on Nexi Business.
    4. Save the new configuration.

    It is advisable to carry out a proof of payment with a real card with the transition to production.

    Payment Methods

    The Nexi XPTA plugin offers customers different payment methods:

    Payment by card

    With this solution, the customer remains on your E-commerce until checkout. It is redirected to the Nexi environment to make the payment and then returns to the merchant's website at the end of the transaction.

    OneClick Payment

    The integration of this solution allows the end customer to store their credit card data, and use them later to make purchases with a few clicks. In the case of first payment XPay will show the form for entering card data while in the case of subsequent payments it will show the card data previously entered or the possibility of entering the data of a new card.

    The payment method can only be activated by subscribing to the Nexi XPay Pro service.

    Pay-By-Link

    This solution involves generating a Prestashop side order, selecting the appropriate products and the customer who wants to make the purchase.

    By clicking on the button "Send an email to the customer with the link to make the payment" an email will be sent to the customer containing a link to make the payment. The customer will be redirected to the checkout page of the E-commerce site.

    Alternative Payment Methods (APMs)

    The plugin offers several alternative payment methods. By selecting the desired method, the customer will be redirected to the checkout page of the chosen payment service. Below is a list of supported payment methods:

    For more information about the payment methods, refer to Payment Methods.

    Back office functions

    In the details of each order, the plugin provides information relating to transactions such as the details of the card used and the status of payments on the XPay gateway.

    Refund

    It is possible to perform total or partial refund operations. This operation will reverse the desired amount by refunding the customer and changing the status of the Magento order. Here are the steps to do:

    1. Login to the Magento admin panel.
    2. In the left navigation bar, select Sales > Orders.
    3. Select the order you want to refund.
    4. In the menu on the left, select Invoices and click on the corresponding invoice.
    5. Select Credit note in the top right.
    6. At the bottom of the page you can now make the refund by clicking on the Refund button. There is the Adjustment fee field in which to modify the amount in order to proceed with a partial refund.

    Accounting

    It is possible to perform total or partial accounting operations. This will account for the desired amount on the XPTA gateway.

    By default the accounting takes place automatically at midnight, use this option only in case of non-standard configurations of the terminal.

    1. Login to the Magento admin panel.
    2. In the left navigation bar, select Sales > Orders.
    3. Select the order you want to book.
    4. Click the Invoice button at the top right.
    5. Click the Submit Invoice button at the bottom of the page.