a a

Magento 2.x - Manual Installation

Manual Install of the SurchX Plugin:

SurchX plugin for Magento provides you the ability to add a new feature of calculating a customer specific transaction fee at the time of checkout.

Pre-Requisites:

1 . The installation of the SurchX plugin is done via the command line, so you must SSH into your Magento instance.

2 . From the home directory of Magento, create the subdirectory structure “app/code/Surchx/Surcharge”.

3 . Move the files from the zip file SurchX provided, into the directory structure you created, like the below screenshot.

Magento File Structure

4 . Once it is completed, run the below commands in your Magento instance CLI.

Megento CLI

1.The command sets the permissions that the installation can write to the directory
  chmod 777 -R var generated pub/static/

2.The below command installs the new extensions
  php bin/magento setup:upgrade

3.The command copies new content related to the extension
  php bin/magento setup:static-content:deploy -f

4.The command clears out old files that may prevent the new content from displaying
  php bin/magento cache:flush

5.The command sets the permissions so that the extension can write to the directory
  chmod 777 -R var generated pub/static/
If you don't have root access or if you see the below message:<br><br>
"Please execute 'magento-cli' instead of 'magento' that uses the proper user to execute any Magento's command"<br><br>
Replace commands 2, 3, & 4 with the following:
2. sudo bin/magento-cli setup:upgrade
3. sudo bin/magento-cli setup:static-content:deploy -f
4. sudo bin/magento-cli cache:flush
Configuration:

1 . Go to the Magento Admin Panel “URL”, enter your credentials and click on “Login”.

Magento 2 Admin

2 . Click on the “Stores” option at the left menu bar and select “configuration” and look for “SurchX Surcharge” option.

Configuration 1

Configuration 2

Configuration 3

3 . Click on the “SurchX Surcharge” option and set enabled to “Yes”.

4 . Set Request Mode to Development or Production depending on your use case

  1. For Test - Request Mode should be “Development”.
  2. For Production - Request Mode should be “Production”.

5 . Enter the SurchX API and SurchX Bearer token.

The API URL and SurchX Token may be requested from SurchX.

Now that the SurchX plugin is enabled successfully in Magento, the SurchX fee is displayed to the user during the checkout process.

Test Site

Go to the SurchX demo site “m2.surchx.com” and experience the user checkout experience.

Transaction Fee

Cart Walkthrough:

SurchX Fee

The checkout page will now display the transaction fee provided by SurchX as a line item.