-
Notifications
You must be signed in to change notification settings - Fork 18
Feature/0.0.2.4 #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/0.0.2.4 #16
Conversation
…n y servicio de consultas SAT
…onsulta status SAT
Se elimina token temporal comentado
| $request->setMethod(HTTP_METH_POST); | ||
|
|
||
| $request->setHeaders(array( | ||
| 'Postman-Token' => 'c05b3bc8-3038-4179-b32d-93a73e738a2e', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No se necesita este header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
se elimina código, se mueve a SatQuery
|
|
||
| public static function soapRequest($rfcEmisor, $rfcReceptor, $total, $uuid){ | ||
| $request = new HttpRequest(); | ||
| $request->setUrl('https://consultaqr.facturaelectronica.sat.gob.mx/ConsultaCFDIService.svc?wdsl'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se supone que la url debería ser un parametro , esto para poder cambiar entre ambientes "Pruebas" y "Produccion"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
se elimina código, se mueve a SatQuery
| <soapenv:Header/> | ||
| <soapenv:Body> | ||
| <tem:Consulta> | ||
| <tem:expresionImpresa><![CDATA[?re=LSO1306189R5&rr=LSO1306189R5&tt=1.16&id=E0AAE6B3-43CC-4B9C-B229-7E221000E2BB]]></tem:expresionImpresa> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codigo quemado?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lo deje como prueba, ya lo quito, queda en el de SatQuery
| } | ||
| } | ||
|
|
||
| public static function soapRequest($rfcEmisor, $rfcReceptor, $total, $uuid){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Que no se supone que esta función es parte de otro archivo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
se elimina código, se mueve a SatQuery
| <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> | ||
| <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> | ||
| <group> | ||
| <file>file:/C:/laragon/www/sw-sdk-php/.travis.yml</file> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alguna razón para eliminar estos ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Es parte de mi proyecto en netbeans, no es necesario para que funcione
| namespace SWServices\Cancelation; | ||
| use Exception; | ||
|
|
||
| class cancelationHandler{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debe ser PascalCase, CamelCase , camel caps
https://en.wikipedia.org/wiki/Camel_case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se realiza cambio
| return array("uuid" => $data); | ||
| } | ||
|
|
||
| public static function soapBody(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Método sin usar...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se elimina método, se migra a SatQuery
|
|
||
| public static function sendReqGet($url, $token, $rfc, $proxy, $service){ | ||
| $curl = curl_init(); | ||
| if(isset($proxy)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La indentacion es importante. Las llaves no son necesarias.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se refactoriza código
| $request->setUrl('https://consultaqr.facturaelectronica.sat.gob.mx/ConsultaCFDIService.svc?wdsl'); | ||
| $request->setMethod(HTTP_METH_POST); | ||
|
|
||
| $request->setHeaders(array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pregunta, ¿cualquiera puede tener acceso al token y Authorization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no se necesita token para entrar a consumir el SOAP del SAT, es público el servicio, de igual manera se mueve el código a SatQuery
| </soapenv:Body> | ||
| </soapenv:Envelope>'); | ||
|
|
||
| echo $response->getBody(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No deberia ser return en vez de echo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
se mueve a SatQuery, donde si queda de esa manera
|
|
||
| $soap = curl_exec($ch); | ||
| curl_close($ch); | ||
| return SatQueryRequest::response(SatQueryRequest::xml2array($soap)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Como se manejarían las exceptions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se utiliza código para manejar exception de cURL
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project-private xmlns="http://www.netbeans.org/ns/project-private/1"> | ||
| <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> | ||
| <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
este archivo lo utiliza tu ide? tal vez deberías excluirlo en el .gitignore
Se agregan nuevos servicios de cancelación/consulta status SAT