| @@ 238-244 (lines=7) @@ | ||
| 235 | } |
|
| 236 | unlink($file); |
|
| 237 | // verificar respuesta del envío y entregar error en caso que haya uno |
|
| 238 | if (!$response or $response == 'Error 500') { |
|
| 239 | if (!$response) |
|
| 240 | \sasco\LibreDTE\Log::write(\sasco\LibreDTE\Estado::ENVIO_ERROR_CURL, \sasco\LibreDTE\Estado::get(\sasco\LibreDTE\Estado::ENVIO_ERROR_CURL, curl_error($curl))); |
|
| 241 | if ($response == 'Error 500') |
|
| 242 | \sasco\LibreDTE\Log::write(\sasco\LibreDTE\Estado::ENVIO_ERROR_500, \sasco\LibreDTE\Estado::get(\sasco\LibreDTE\Estado::ENVIO_ERROR_500)); |
|
| 243 | return false; |
|
| 244 | } |
|
| 245 | // cerrar sesión curl |
|
| 246 | curl_close($curl); |
|
| 247 | // crear XML con la respuesta y retornar |
|
| @@ 665-673 (lines=9) @@ | ||
| 662 | } |
|
| 663 | unlink($file); |
|
| 664 | // verificar respuesta del envío y entregar error en caso que haya uno |
|
| 665 | if (!$response or $response=='Error 500') { |
|
| 666 | if (!$response) { |
|
| 667 | \sasco\LibreDTE\Log::write(Estado::ENVIO_ERROR_CURL, Estado::get(Estado::ENVIO_ERROR_CURL, curl_error($curl))); |
|
| 668 | } |
|
| 669 | if ($response=='Error 500') { |
|
| 670 | \sasco\LibreDTE\Log::write(Estado::ENVIO_ERROR_500, Estado::get(Estado::ENVIO_ERROR_500)); |
|
| 671 | } |
|
| 672 | return false; |
|
| 673 | } |
|
| 674 | // cerrar sesión curl |
|
| 675 | curl_close($curl); |
|
| 676 | // crear XML con la respuesta y retornar |
|