Diferenças entre edições de "Página principal"
Linha 8: | Linha 8: | ||
* [[Processos_Planejamento_de_turmas|Processos Planejamento de Turmas]] | * [[Processos_Planejamento_de_turmas|Processos Planejamento de Turmas]] | ||
* [[Cubos|Documentação de Cubos]] | * [[Cubos|Documentação de Cubos]] | ||
+ | |||
+ | = Instalação = | ||
+ | |||
+ | Assumindo que já tenha instalado o [https://nodejs.org/ Node.js], crie um diretório para conter o seu aplicativo, e torne-o seu diretório ativo. | ||
+ | |||
+ | Clone os arquivos do repositório no diretório | ||
+ | |||
+ | Abra o console e rode o comando | ||
+ | |||
+ | <syntaxhighlight lang="shell">$ npm install</syntaxhighlight> | ||
+ | rode o servidor | ||
+ | |||
+ | <syntaxhighlight lang="shell">$ npm start</syntaxhighlight> | ||
+ | |||
+ | |||
+ | = End-points = | ||
+ | |||
+ | |||
+ | |||
+ | ==== POST: ''localhost:9090/esitef/v1/transition/validate'' ==== | ||
+ | |||
+ | ''Requisição'': | ||
+ | |||
+ | <syntaxhighlight lang="json">{ | ||
+ | "card": { | ||
+ | "number": "string", | ||
+ | "date": "string(4)", | ||
+ | "cvv": "string(3-4)", | ||
+ | "flag": "int" | ||
+ | }, | ||
+ | payer:{ | ||
+ | code: "string" | ||
+ | } | ||
+ | }</syntaxhighlight> | ||
+ | ''Resposta'': | ||
+ | |||
+ | <syntaxhighlight lang="json">{ | ||
+ | "code": int, | ||
+ | "message": "string", | ||
+ | "payer": { | ||
+ | "token": "string", | ||
+ | "suffix": "string(4)" | ||
+ | } | ||
+ | }</syntaxhighlight> | ||
+ | |||
+ | |||
+ | ==== POST: ''localhost:9090/esitef/v1/transition/payment'' ==== | ||
+ | |||
+ | ''Requisição'': | ||
+ | |||
+ | <syntaxhighlight lang="json">{ | ||
+ | "card": { | ||
+ | "token" | ||
+ | }, | ||
+ | "order": { | ||
+ | "id": "int", | ||
+ | "amount": "int", | ||
+ | "installments": "int" | ||
+ | }, | ||
+ | "schedule": { | ||
+ | "id": "int", | ||
+ | "amount": "int", | ||
+ | "start_date": "string", | ||
+ | "installments": "int" | ||
+ | } | ||
+ | }</syntaxhighlight> | ||
+ | ''Resposta'': | ||
+ | |||
+ | <syntaxhighlight lang="json">{ | ||
+ | "code": "int", | ||
+ | "nit": "string", | ||
+ | "sid": "string", | ||
+ | status:{ | ||
+ | payment: "char(3)", | ||
+ | schedule: "char(3)", | ||
+ | message: "string" | ||
+ | }, | ||
+ | payer:{ | ||
+ | token: "string" | ||
+ | } | ||
+ | }</syntaxhighlight> | ||
+ | ==== GET: ''localhost:9090/esitef/v1/transition/{nit}'' ==== | ||
+ | |||
+ | ''Resposta'': | ||
+ | |||
+ | <syntaxhighlight lang="json">{ | ||
+ | "code":"0", | ||
+ | "message":"OK. Transaction successful.", | ||
+ | "payment":{ | ||
+ | "authorizer_code":"000", | ||
+ | "authorizer_message":"Transacao OK", | ||
+ | "status":"CON", | ||
+ | "nit":"1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr", | ||
+ | "order_id":"13064421440", | ||
+ | "customer_receipt":"==== CUPOM COMPRADOR ====", | ||
+ | "merchant_receipt":"==== CUPOM ESTABELECIMENTO ====", | ||
+ | "authorizer_id":"2", | ||
+ | "acquirer_id":"1005", | ||
+ | "acquirer_name":"Redecard", | ||
+ | "authorizer_date":"13/07/2017T18:44", | ||
+ | "authorization_number":"132048", | ||
+ | "merchant_usn":"13064421441", | ||
+ | "esitef_usn":"170713097341620", | ||
+ | "sitef_usn":"132048", | ||
+ | "host_usn":"999132048 ", | ||
+ | "payment_date":"13/07/2017T18:44", | ||
+ | "amount":"1000", | ||
+ | "payment_type":"C", | ||
+ | "issuer":"2", | ||
+ | "authorizer_merchant_id":"000000000000005" | ||
+ | } | ||
+ | }</syntaxhighlight> | ||
+ | === Informações relevantes === | ||
+ | |||
+ | [[File:C:\Projects\sitefApiNode\img_readme\image-20201117093750497.png|thumb|none]] | ||
+ | |||
+ | [[File:C:\Projects\sitefApiNode\img_readme\image-20201117131538016.png|thumb|none]] | ||
+ | |||
+ | |||
+ | |||
+ | = Observações: = | ||
+ | |||
+ | # Não serão feitos agendamentos recorrentes em dias 29, 30 e 31. | ||
+ | # A lista de códigos de erro está na [https://esitef-homologacao.softwareexpress.com.br/api/docs/codigos-da-api/#c%C3%B3digos-de-resposta documentação do sitef] |
Revisão das 14h46min de 20 de novembro de 2020
Wiki QI
Está é Wiki de documentação dos processos da QI.
- Processos Financeiros
- Processos Acadêmicos
- Processos Folha de Pagamento
- Processos Planejamento de Turmas
- Documentação de Cubos
Índice
Instalação
Assumindo que já tenha instalado o Node.js, crie um diretório para conter o seu aplicativo, e torne-o seu diretório ativo.
Clone os arquivos do repositório no diretório
Abra o console e rode o comando
<syntaxhighlight lang="shell">$ npm install</syntaxhighlight> rode o servidor
<syntaxhighlight lang="shell">$ npm start</syntaxhighlight>
End-points
POST: localhost:9090/esitef/v1/transition/validate
Requisição:
<syntaxhighlight lang="json">{ "card": { "number": "string", "date": "string(4)", "cvv": "string(3-4)", "flag": "int" },
payer:{ code: "string" }
}</syntaxhighlight> Resposta:
<syntaxhighlight lang="json">{ "code": int,
"message": "string",
"payer": { "token": "string",
"suffix": "string(4)"
} }</syntaxhighlight>
POST: localhost:9090/esitef/v1/transition/payment
Requisição:
<syntaxhighlight lang="json">{ "card": { "token" }, "order": { "id": "int", "amount": "int", "installments": "int" }, "schedule": { "id": "int", "amount": "int", "start_date": "string", "installments": "int" } }</syntaxhighlight> Resposta:
<syntaxhighlight lang="json">{ "code": "int", "nit": "string", "sid": "string", status:{ payment: "char(3)", schedule: "char(3)",
message: "string"
}, payer:{ token: "string" } }</syntaxhighlight>
GET: localhost:9090/esitef/v1/transition/{nit}
Resposta:
<syntaxhighlight lang="json">{
"code":"0", "message":"OK. Transaction successful.", "payment":{ "authorizer_code":"000", "authorizer_message":"Transacao OK", "status":"CON", "nit":"1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr", "order_id":"13064421440", "customer_receipt":"==== CUPOM COMPRADOR ====", "merchant_receipt":"==== CUPOM ESTABELECIMENTO ====", "authorizer_id":"2", "acquirer_id":"1005", "acquirer_name":"Redecard", "authorizer_date":"13/07/2017T18:44", "authorization_number":"132048", "merchant_usn":"13064421441", "esitef_usn":"170713097341620", "sitef_usn":"132048", "host_usn":"999132048 ", "payment_date":"13/07/2017T18:44", "amount":"1000", "payment_type":"C", "issuer":"2", "authorizer_merchant_id":"000000000000005" }
}</syntaxhighlight>
Informações relevantes
Observações:
- Não serão feitos agendamentos recorrentes em dias 29, 30 e 31.
- A lista de códigos de erro está na documentação do sitef