| 1 | <?php  | 
            ||
| 5 | final class Endpoint  | 
            ||
| 6 | { | 
            ||
| 7 | const PRODUCTION = 'https://www.librepag.com.br';  | 
            ||
| 8 | const SANDBOX = 'https://sandbox.ipag.com.br';  | 
            ||
| 9 | const PAYMENT = '/pagamento';  | 
            ||
| 10 | const CONSULT = '/consulta';  | 
            ||
| 11 | const CAPTURE = '/captura';  | 
            ||
| 12 | const CANCEL = '/cancela';  | 
            ||
| 13 | |||
| 14 | /**  | 
            ||
| 15 | * @var string  | 
            ||
| 16 | */  | 
            ||
| 17 | private $url;  | 
            ||
| 18 | |||
| 19 | public function __construct($url = self::PRODUCTION)  | 
            ||
| 20 |     { | 
            ||
| 21 | $this->url = $url;  | 
            ||
| 22 | }  | 
            ||
| 23 | |||
| 24 | /**  | 
            ||
| 25 | * @return string  | 
            ||
| 26 | */  | 
            ||
| 27 | public function payment()  | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * @return string  | 
            ||
| 34 | */  | 
            ||
| 35 | public function consult()  | 
            ||
| 39 | |||
| 40 | /**  | 
            ||
| 41 | * @return string  | 
            ||
| 42 | */  | 
            ||
| 43 | public function capture()  | 
            ||
| 47 | |||
| 48 | /**  | 
            ||
| 49 | * @return string  | 
            ||
| 50 | */  | 
            ||
| 51 | public function cancel()  | 
            ||
| 55 | |||
| 56 | /**  | 
            ||
| 57 | * @return string  | 
            ||
| 58 | */  | 
            ||
| 59 | public function getUrl()  | 
            ||
| 63 | |||
| 64 | /**  | 
            ||
| 65 | * @param string $url  | 
            ||
| 66 | *  | 
            ||
| 67 | * @return self  | 
            ||
| 68 | */  | 
            ||
| 69 | public function setUrl($url)  | 
            ||
| 75 | }  | 
            ||
| 76 |