I came to the conclusion, that the method redirect()
can only be undefined, if you were using Opencart 2.x, so please ignore my comment about which version you use.
In Opencart 2.0 $this->redirect()
has been changed to $this->response->redirect()
. So line 17 should look something like this:
$this->response->redirect($this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL'));
An even better way of doing it (by keeping it compatible with Opencart 1.5.x) would be something, like this:
if (version_compare(VERSION, '2.0', '>=')) {
$this->response->redirect($this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL'));
} else {
$this->redirect($this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL'));
}