original_string: function redirectToGateway($payment) {
  
  		if (headers_sent($file, $line)) {
  			$this->writeToLog("Can't redirect, headers sent at $file, line $line");
  			throw new Exception("Can't redirect the browser, headers were already sent at $file line $line");
  		}
  
  		$url = $this->getPaymentProcessUrl($payment);
  		$this->writeToLog("Redirecting to payment gate...");
  
  		header("HTTP/1.1 302 Moved");
  		header("Location: $url");
  		header("Connection: close");
  	}
code: function redirectToGateway($payment) {
  
  		if (headers_sent($file, $line)) {
  			$this->writeToLog("Can't redirect, headers sent at $file, line $line");
  			throw new Exception("Can't redirect the browser, headers were already sent at $file line $line");
  		}
  
  		$url = $this->getPaymentProcessUrl($payment);
  		$this->writeToLog("Redirecting to payment gate...");
  
  		header("HTTP/1.1 302 Moved");
  		header("Location: $url");
  		header("Connection: close");
  	}
code_tokens: function redirectToGateway ( $ payment ) { if ( headers_sent ( $ file , $ line ) ) { $ this -> writeToLog ( "Can't redirect, headers sent at $file, line $line" ) ; throw new Exception ( "Can't redirect the browser, headers were already sent at $file line $line" ) ; } $ url = $ this -> getPaymentProcessUrl ( $ payment ) ; $ this -> writeToLog ( "Redirecting to payment gate..." ) ; header ( "HTTP/1.1 302 Moved" ) ; header ( "Location: $url" ) ; header ( "Connection: close" ) ; }
docstring: Redirect customer's browser to payment gateway.
  
  Use this after you successfully called paymentInit()
  
  Note that HTTP headers must not have been sent before.
  
  @param string|Payment $payment Either PayID given during paymentInit(),
  or just the Payment object you used in paymentInit()
  
  @throws Exception If headers has been already sent
docstring_tokens: Redirect customer s browser to payment gateway .