This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"count":2, | |
"next":null, | |
"previous":null, | |
"results":[ | |
{ | |
"numero":"001-001-000000110", | |
"comprador_correo":"[email protected]", | |
"detalle":[ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apikey": "497eacaa70f34afb86e343d568540cc5", | |
"codigoestablecimiento": "001", | |
"codigopuntoventa":"001", | |
"secuencia": "000000003", | |
"fechainiciotransporte":"12-12-2014", | |
"fechafintransporte": "12-12-2014", | |
"direccionpartida": "Victor Emilio Estrada", | |
"transportista": { | |
"tipoidentificacion":"RUC", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Implementación de Código de control con módulo 11 | |
;; http://es.wikipedia.org/wiki/C%C3%B3digo_de_control | |
(defn verificador-suma-parcial [grupo] (reduce + 0 (map * grupo (range 2 8)))) | |
(defn digito-verificador [clave-acceso] | |
(let [c (partition 6 6 nil (map #(Integer/parseInt (str %)) (reverse clave-acceso))) | |
digito (reduce + 0 (map verificador-suma-parcial c)) | |
m (mod digito 11)] | |
(if (> m 1) (- 11 m) m))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defroutes routes | |
["/contact" {:get [:contact home/contact-page] ;; Handler for GET /contact | |
:post [^:interceptors [home/verify-contact-form] ;; Interceptors for POST /contact | |
:contact-submit home/contact-submit-form]} ;; Handler for POST /contact | |
^:interceptors [middlewares/keyword-params]]) ;; Interceptors for any HTTP verb in the /contact route |
NewerOlder