When OpenCart 2.0 was initially released, it contained a built-in payment gateway for WorldPay Business Gateway. From OpenCart 18.104.22.168, this was replaced without warning by a payment gateway for WorldPay Online Payments, and the old gateway was removed. WorldPay Business Gateway uses a totally different API to WorldPay Online Payments as the transaction is actually handled on the WorldPay servers. The Online Payments gateway interacts with WorldPay behind the scenes to allow the transaction to take place on your own website.
The two systems have very different configuration values. For example, Business Gateway uses a Merchant ID and Payment Response Password, while Online Payments uses a Service Key and Client Key for authentication.
This left OpenCart admins with rather limited and unsatisfactory options:
- Remain at version 22.214.171.124, and forgo any feature or security updates to OpenCart.
- Move their WorldPay account to an Online Payments account. This requires a whole new application, and can take weeks.
- Buy an expensive 3rd party module to integrate with Business Gateway.
Upgrading to Online Payments also brings onerous DCI compliance requirements as customer payment data is now being processed and stored on your own site.
In the end I found that copying the WorldPay module files from version 126.96.36.199 to the current version enabled the old gateway to be used with the latest version of OpenCart.
- Download OpenCart 188.8.131.52 from this page.
- Unzip the downloaded archive.
- Copy the following files to the same location on your OpenCart site, overwriting the existing files:
/admin/controller/payment/worldpay.php /admin/language/english/payment/worldpay.php /admin/view/template/payment/worldpay.tpl /catalog/controller/payment/worldpay.php /catalog/language/english/payment/worldpay.php /catalog/model/payment/worldpay.php
- Copy the following files into your theme folder at /catalog/view/theme/your-theme-name/template/payment/:
/catalog/view/theme/default/template/payment/worldpay.tpl /catalog/view/theme/default/template/payment/worldpay_success.tpl /catalog/view/theme/default/template/payment/worldpay_failure.tpl
- Delete the following files:
That should enable the old WorldPay Business Gateway module on your OpenCart 2.x site (Tested with 184.108.40.206).