public function redirectOrRespond()
    {
        if ($this->isRedirect()) {
            $redirectResponse = $this->omnipayResponse->getRedirectResponse();
            if ($redirectResponse instanceof \Symfony\Component\HttpFoundation\RedirectResponse) {
                $this->targetUrl = $redirectResponse->getTargetUrl();

                return Controller::curr()->redirect($this->targetUrl);
            } else {
                return new HTTPResponse((string)$redirectResponse->getContent(), 200);
            }
        }

        if ($this->httpResponse) {
            return $this->httpResponse;
        }

        if ($this->targetUrl) {
            return Controller::curr()->redirect($this->targetUrl);
        }

        // return some default HTTP responses
        return $this->isError()
            ? new HTTPResponse("NOK", 500)
            : new HTTPResponse("OK", 200);
    }