@@ -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 |
@@ -179,12 +179,12 @@ discard block |
||
179 | 179 | |
180 | 180 | $this->idPago = $idPago; |
181 | 181 | |
182 | - $url = $this->root.'payment'; // endpoint |
|
182 | + $url = $this->root . 'payment'; // endpoint |
|
183 | 183 | |
184 | 184 | $myCurl = curl_init(); |
185 | 185 | curl_setopt($myCurl, CURLOPT_RETURNTRANSFER, 1); |
186 | 186 | curl_setopt($myCurl, CURLOPT_CUSTOMREQUEST, "DELETE"); |
187 | - curl_setopt($myCurl, CURLOPT_URL, $url.'?'.'KeyID='.$this->keyId.'&PublicKeyId='.$this->publicKeyId.'&id='.$this->idPago); |
|
187 | + curl_setopt($myCurl, CURLOPT_URL, $url . '?' . 'KeyID=' . $this->keyId . '&PublicKeyId=' . $this->publicKeyId . '&id=' . $this->idPago); |
|
188 | 188 | $server_output = curl_exec($myCurl); |
189 | 189 | curl_close($myCurl); |
190 | 190 | $obj = json_decode($server_output); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | |
212 | 212 | $this->checkRequiredParams($params); |
213 | 213 | |
214 | - $url = $this->root.'payment'; // endpoint |
|
214 | + $url = $this->root . 'payment'; // endpoint |
|
215 | 215 | |
216 | 216 | $obj = $this->curlTransaccionInfo($url, $idPago); |
217 | 217 | $result = $this->checkResponseCode($obj); |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $this->idPago = $idPago; |
262 | 262 | |
263 | 263 | $myCurl = curl_init(); |
264 | - curl_setopt($myCurl, CURLOPT_URL, $url.'?'.'KeyID='.$this->keyId.'&PublicKeyId='.$this->publicKeyId.'&id='.$this->idPago); |
|
264 | + curl_setopt($myCurl, CURLOPT_URL, $url . '?' . 'KeyID=' . $this->keyId . '&PublicKeyId=' . $this->publicKeyId . '&id=' . $this->idPago); |
|
265 | 265 | curl_setopt($myCurl, CURLOPT_RETURNTRANSFER, 1); |
266 | 266 | $server_output = curl_exec($myCurl); |
267 | 267 | curl_close($myCurl); |