@@ -27,8 +27,8 @@ |
||
| 27 | 27 | * @copyright 2016 Angel Cruz |
| 28 | 28 | */ |
| 29 | 29 | |
| 30 | -spl_autoload_register(function ($class) { |
|
| 31 | - $file = dirname(__DIR__).DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php'; |
|
| 30 | +spl_autoload_register(function($class) { |
|
| 31 | + $file = dirname(__DIR__) . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php'; |
|
| 32 | 32 | |
| 33 | - return (!is_file($file)) ?: require $file; |
|
| 33 | + return ( ! is_file($file)) ?: require $file; |
|
| 34 | 34 | }); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $this->statusId = $statusId; |
| 102 | 102 | $this->ipAddres = $ipAddres; |
| 103 | 103 | |
| 104 | - $url = $this->root.'payment'; // endpoint |
|
| 104 | + $url = $this->root . 'payment'; // endpoint |
|
| 105 | 105 | |
| 106 | 106 | $fields = [ |
| 107 | 107 | 'KeyID' => $this->keyId, //required |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | $this->idPago = $idPago; |
| 146 | 146 | $this->amount = $amount; |
| 147 | 147 | |
| 148 | - $url = $this->root.'complete'; // endpoint |
|
| 148 | + $url = $this->root . 'complete'; // endpoint |
|
| 149 | 149 | |
| 150 | 150 | $fields = [ |
| 151 | 151 | 'KeyID' => $this->keyId, //required |
@@ -195,10 +195,10 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | $this->idPago = $idPago; |
| 197 | 197 | |
| 198 | - $url = $this->root.'payment'; // endpoint |
|
| 198 | + $url = $this->root . 'payment'; // endpoint |
|
| 199 | 199 | |
| 200 | 200 | $myCurl = curl_init(); |
| 201 | - curl_setopt($myCurl, CURLOPT_URL, $url.'?'.'KeyID='.$this->keyId.'&PublicKeyId='.$this->publicKeyId.'&id='.$this->idPago); |
|
| 201 | + curl_setopt($myCurl, CURLOPT_URL, $url . '?' . 'KeyID=' . $this->keyId . '&PublicKeyId=' . $this->publicKeyId . '&id=' . $this->idPago); |
|
| 202 | 202 | curl_setopt($myCurl, CURLOPT_RETURNTRANSFER, 1); |
| 203 | 203 | $server_output = curl_exec($myCurl); |
| 204 | 204 | curl_close($myCurl); |