...
Now go to your Magento root directory, say it's named magento2, and execute the following commands:
composer require worldpay/worldpay-lib-php
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
...