/** * Get the appropriate redirect url */ public function getRedirectURL() { if ($this->response) { if ($this->response->isSuccessful()) { return $this->getReturnUrl(); } elseif ($this->response->isRedirect()) { return $this->response->getRedirectUrl(); } } return $this->getCancelUrl(); }