for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ipag\Classes;
final class Endpoint
{
const PRODUCTION = 'https://www.librepag.com.br';
const SANDBOX = 'https://sandbox.ipag.com.br';
const PAYMENT = '/pagamento';
const CONSULT = '/consulta';
const CAPTURE = '/captura';
const CANCEL = '/cancela';
/**
* @var string
*/
private $url;
public function __construct($url = self::PRODUCTION)
$this->url = $url;
}
* @return string
public function payment()
return $this->url.self::PAYMENT;
public function consult()
return $this->url.self::CONSULT;
public function capture()
return $this->url.self::CAPTURE;
public function cancel()
return $this->url.self::CANCEL;
public function getUrl()
return $this->url;
* @param string $url
*
* @return self
public function setUrl($url)
return $this;