Installation

The Worldpay Payments Plugin for Magento 2 is hosted on Github and on Packagist.

Install the plugin using Composer

Prerequisite: You must download Composer and install it on your machine.

Check the version you need to install from Packagist.

Run the following command:

composer require sapient/module-worldpay to install the updated version.

Or:

composer require sapient/module-worldpay: v2.3.4-rc0620 to install that specific version.

The following appears as an output:

Install the plugin from GitHub

We recommend the Packagist installation, but if you have issues with that then download the plugin from GitHub.

Run following command to add the Worldpay GitHub repository to your composer.json file:

composer config repositories.repo-name git https://github.com/Worldpay/Worldpay- Magento2-CG.git

The Worldpay GitHub repository is now added to your composer.json file:

Run the following command to install the plugin including the version you want to install:

composer require sapient/module-worldpay: v2.3.4-rc0620

You will see the following output:

Install the plugin from a GitHub branch

Do this if Worldpay has given you a patch. To install the plugin from Github branch, get the branch details from Worldpay. If the branch name is release-v2.3.4-rc0620, run the following command:

composer require sapient/module-worldpay:dev-release-v2.3.4-rc0620

In this case, the dev parameter tells Composer that you are trying to download the package from the GitHub branch. You will see the following output:

After you complete the installation, run the following command to refresh the Magento cache:

php bin/magento setup:upgrade && php bin/magento setup:static-content:deploy -f && php bin/magento cache:flush

Install the plugin after manual download

To do a manual installation:

  1. Download the extension from the Magento marketplace, which Worldpay recommends.
  2. If you have any issues with the Magento marketplace, download the extension from GitHub.
  3. Unzip the file in a temporary folder.
  4. You must create an app/code/Sapient/Worldpay folder to hold the unzipped Magento file structure mentioned in step 3.
  5. After you complete the steps above, run the following command to refresh the Magento cache:

php bin/magento setup:upgrade && php bin/magento setup:static-content:deploy -f && php bin/magento cache:flush

Basic configuration

| General configuration settings | Description | | ------------- |-------------| -----| | Enable Worldpay* | When set to Yes, shoppers can process transactions using the Worldpay Payment Gateway at checkout.| | Environment Mode* | Toggles between Test and Live modes. Set it to Live after testing is completed and before production launch.| | Test URL*| The Worldpay test environment’s URL| | Live URL** | The Worldpay Live environment’s URL
Your Worldpay support contact provides this.| | Merchant Code* | Your Worldpay merchant code, which your Worldpay support contact provides.| | XML Username* | Your Worldpay XML username, which you will find in the Worldpay Merchant Admin Interface.| | XML Password* | Your Worldpay XML password, which you can set in the Worldpay Merchant Admin Interface.|

All fields marked (*) are mandatory.

All fields marked (**) are mandatory for production mode.

To find out more about features and configurations, refer to the Worldpay Payments Plugin User Guide. You can also find out more on the Worldpay Payment Gateway Guide.

Troubleshooting

  • Refer to the User Guide to verify the plugin’s configurations.
  • You can also check the installation information in the [Worldpay Troubleshooting, General Errors](https://developer.worldpay.com/docs/wpg/troubleshoot/generalerrors) section.
  • You can customize error messages. See Worldpay Exception Codes in the User Guide.
  • Make sure the Worldpay module is enabled, the correct environment mode is set and the correct environment URL has been updated under Stores/Configuration/Sales/Worldpay/General Configuration

| Issue | Troubleshooting | | ------------- |-------------| -----| | Authentication-related issue with error code 4 | Please verify your merchant code, XML username and XML password at Stores/Configuration/Sales/Worldpay/General Configuration.
Consult Worldpay to ensure that IP address mapping has been implemented correctly. | |Debugging mode | You must set Enable Logging to Yes under Stores/Configuration/Sales/Worldpay/General Configuration.| | Switch between Direct Integration and HPP| Ensure you have set the appropriate Integration Mode at Stores/Configuration/Sales/Worldpay/Credit Card.| | Client-side encryption not working | You must set Client Side Encryption Enabled to Yes and the correct Public Key must be updated at Stores/Configuration/Sales/Worldpay/Credit Card.| | CVC not displaying on Checkout form | Ensure that Require CVC is set to Yes at Stores/Configuration/Sales/Worldpay/Credit Card.| | 3DS1 not working |Ensure that Activate 3DS Authentication and Enable 3DS1 Authentication are set to Yes at Stores/Configuration/Sales/Worldpay/Credit Card 3DS Authentication.| | 3DS2 not working | Check that Activate 3DS Authentication and Enable 3DS2 Authentication are set to Yes and that you have set all the parameters under Configure 3DS2 correctly at Stores/Configuration/Sales/Worldpay/Credit Card 3DS Authentication.
See the User Guide for how to verify the plugin configurations and all other details.
You can also use the online Worldpay 3DS Flex guide for more information.| | Hosted payment page not working | Ensure that Integration Mode is set to Redirect at Stores/Configuration/Sales/Worldpay/Credit Card.
Also, check that HPP Enabled is set to Yes and the correct Installation ID has been updated at Stores/Configuration/Sales/Worldpay/Hosted Payment Page. | Unable to save card for future usage | Ensure that Saved Card is set to Yes and that either Enable Tokenization or Enable Merchant Tokens is set to Yes at Stores/Configuration/Sales/Worldpay/Tokenization. Refer the User Guide to verify the plugin configurations and other details.

See the User Guide to find out more about various features.

For any issues not included in the table above, contact your Worldpay support representative with the following details to help them resolve the issue:

  • A screenshot of the issue

  • A screenshot of the particular admin configuration

  • Plugin-specific log

  • Worldpay.log

  • Your plugin and Magento versions

If you need more information, contact your Worldpay support contact. If they are not available, call our customer service team at 0800 096 3997.