| @@ 653-661 (lines=9) @@ | ||
| 650 | } |
|
| 651 | unlink($file); |
|
| 652 | // verificar respuesta del envío y entregar error en caso que haya uno |
|
| 653 | if (!$response or $response=='Error 500') { |
|
| 654 | if (!$response) { |
|
| 655 | \sasco\LibreDTE\Log::write(Estado::ENVIO_ERROR_CURL, Estado::get(Estado::ENVIO_ERROR_CURL, curl_error($curl))); |
|
| 656 | } |
|
| 657 | if ($response=='Error 500') { |
|
| 658 | \sasco\LibreDTE\Log::write(Estado::ENVIO_ERROR_500, Estado::get(Estado::ENVIO_ERROR_500)); |
|
| 659 | } |
|
| 660 | return false; |
|
| 661 | } |
|
| 662 | // cerrar sesión curl |
|
| 663 | curl_close($curl); |
|
| 664 | // crear XML con la respuesta y retornar |
|
| @@ 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 |
|