Changes to OpenCart payment's controller inline with WorldPay updates

lisa Lisa, 8th May 2013

If you use WorldPay to process your payments on your OpenCart shop you may have recently received emails from them about updates to their system.

For a client running OpenCart v. 1.5.1.3.1 I've just made the following changes to their WorldPay controller, so as to call to a different WorldPay URL.

In catalog/controller/payment/worldpay.php on around line 12

$this->data['action'] = 'https://select.worldpay.com/wcc/purchase';

became...

$this->data['action'] = 'https://secure.worldpay.com/wcc/purchase';

Meanwhile I've checked a client's site running OpenCart v.1.5.4.1 and the same area of code already looks like:

if (!$this->config->get('worldpay_test')){ $this->data['action'] = 'https://secure.worldpay.com/wcc/purchase'; }else{ $this->data['action'] = 'https://secure-test.worldpay.com/wcc/purchase'; }

Hope that helps anyone who missed the email and is wondering why their WorldPay payments have stopped working after the 30th May!

More from our blog

18a win Netty 2024 award for Activibees.com

18a win Netty 2024 award for Activibees.com

29.02.24

We are delighted to announce that 18a has been recognised for its outstanding work in the "Web Design Agency of the Year - UK" category at… Read →

Generating an Effective Content Security Policy with your Laravel React App

Generating an Effective Content Security Policy with your Laravel React App

27.02.24

I recently had an interesting problem to solve. I'd built a brand new author website on a shiny installation of Laravel 10, utilising its out-of-the-box… Read →

If your WordPress website looks broken, it could be because of this.

If your WordPress website looks broken, it could be because of this.

15.02.24

WordPress is the incredibly popular blogging-come-full-website platform that powers over 835 million websites* in 2024. It's functionality is extended by plugins, and one such very… Read →