Skip to content

Commit

Permalink
Merge pull request #107 from ValeriaHerreraP/docs/PT-5083-account-val…
Browse files Browse the repository at this point in the history
…idator

Docs/pt 5083 account validator
  • Loading branch information
meiyerDev authored Sep 18, 2024
2 parents dc25c98 + 6b6614c commit 338443b
Show file tree
Hide file tree
Showing 42 changed files with 2,249 additions and 2 deletions.
Binary file added public/Account_validator/account_validator1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/business_account.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/business_account1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/confirm10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/link_account6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/msj8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/personal_account.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/personal_account1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added public/Account_validator/personal_account2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/personal_account3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/plaid5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/process_confirm11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Account_validator/validate_code9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
559 changes: 559 additions & 0 deletions src/assets/apis/account-validator/en.yaml

Large diffs are not rendered by default.

559 changes: 559 additions & 0 deletions src/assets/apis/account-validator/es.yaml

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/components/SelectMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ const LINKS = {
href: '/microsites',
icon: Calendar,
},
{
title: 'Account Validator',
description: 'Verificación de cuentas',
href: '/account-validator',
icon: SecurityCard,
},
],
[LANGUAGES_CODES.EN]: [
{
Expand Down Expand Up @@ -95,6 +101,12 @@ const LINKS = {
href: '/en/microsites',
icon: Calendar,
},
{
title: 'Account Validator',
description: 'Account verification',
href: '/account-validator',
icon: SecurityCard,
},
],
}

Expand Down
60 changes: 60 additions & 0 deletions src/constants/navigations.js
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,66 @@ export const TAB_NAVIGATION = {
},
],
},
'account-validator': {
[LANGUAGES_CODES.ES]: [
{
title: 'API',
identifier: 'account-validator',
href: '/account-validator/api',
icon: DocumentCode,
links: [
{
title: 'Documentación',
links: [

{ title: 'Introducción', href: '/account-validator', },
{ title: '¿Cómo funciona?', href: '/account-validator/how-to-work' },
{ title: 'Flujo del usuario', href: '/account-validator/user-flow' },
{ title: 'Micro depósitos', href: '/account-validator/micro-deposits' },
{ title: 'Soporte para Lightbox', href: '/account-validator/support' }
]
},
{
title: 'API',
links: [
{ title: 'Url de ambientes', href: '/account-validator/api/environment-urls', },
{ title: 'Sesión', href: '/account-validator/api/session' },
{ title: 'Validador de cuenta', href: '/account-validator/api/validate-existing-account' },
],
},
],
},
],
[LANGUAGES_CODES.EN]: [
{
title: 'API',
identifier: 'account-validator',
href: '/account-validator/api',
icon: DocumentCode,
links: [
{
title: 'Documentation',
links: [

{ title: 'Introduction', href: '/account-validator', },
{ title: '¿How it works?', href: '/account-validator/how-to-work' },
{ title: 'User flow', href: '/account-validator/user-flow' },
{ title: 'Micro deposits', href: '/account-validator/micro-deposits' },
{ title: 'Lightbox Support', href: '/account-validator/support' }
]
},
{
title: 'API',
links: [
{ title: 'URL of environments', href: '/account-validator/api/environment-urls', },
{ title: 'Session', href: '/account-validator/api/session' },
{ title: 'Account validator', href: '/account-validator/api/validate-existing-account' },
],
},
],
},
],
},
'payment-links': {
[LANGUAGES_CODES.ES]: [
{
Expand Down
6 changes: 5 additions & 1 deletion src/hooks/useNavigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export const useNamespaceRoute = () => {
return 'ticket';
case 'core':
return 'core';
case 'account-validator':
return 'account-validator';
default:
return 'gateway';
}}
Expand Down Expand Up @@ -55,6 +57,8 @@ export const useNavigation = (namespaces) => {
return TAB_NAVIGATION['ticket'][locale].find((item) => item.identifier === tabRouter.active)?.links ?? [];
case 'core':
return TAB_NAVIGATION['core'][locale].find((item) => item.identifier === tabRouter.active)?.links ?? [];
case 'account-validator':
return TAB_NAVIGATION['account-validator'][locale].find((item) => item.identifier === tabRouter.active)?.links ?? [];
default:
throw new Error(`The namespace navigation '${namespaces}' is not defined`);
}
Expand All @@ -72,4 +76,4 @@ export const useAllNavigation = () => {
}

return navigations;
}
}
11 changes: 11 additions & 0 deletions src/pages/account-validator/api/environment-urls.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Account Validator

| Ambiente | URL |
| --- | --- |
| Production | `https://account-validator.placetopay.com` |
| Pruebas | `http://qa-account-validator.placetopay.ws` |
| Desarrollo | `http://dev-account-validator.placetopay.ws` |




192 changes: 192 additions & 0 deletions src/pages/account-validator/api/session.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
export const sectionMode = 'nav';
export const description =
'En esta página, encontrarás información sobre la API Crear y consultar el estado de una Sesión.'

export const apiRefs = ['/api/create-session', '/api/check-session-status'];

## Crear una Sesión {{ id: 'create-a-session', tag: 'POST', label: '/api/verification/session' }}

<Row>
<Col>
Este endpoint te permite crear una sesión de verificación de cuenta.

<ApiReader
path="/api/create-session"
method="post"
api={props.refs}
/>

</Col>
<Col sticky>
<CodeGroup title="Solicitud" tag="POST" label="/api/session">
```bash {{ title: 'cURL' }}
curl -X "POST" https://checkout-test.placetopay.com/api/verification/session \
-H "Content-Type: application/json" \
-d '{
"locale": "es_CO",
"auth": {
"login": "5991de4fa93bcd7b28cf5100c25099e1",
"tranKey": "OoamCdSidq121234430nH5x94yxd4=",
"nonce": "NG5vejc2b41xdm8=",
"seed": "2024-04-19T12:06:56-05:00"
},
"user": {
"name": "John",
"surname": "Doe",
"email": "john_doe@mail.com"
},
"returnUrl": "https://www.placetopay.com",
"locale": "es_PR"
}'
```
</CodeGroup>
</Col>
</Row>

<Row>
<Col>
<ApiReader
path="/api/create-session"
method="post"
type="response"
api={props.refs}
/>
</Col>

<Col sticky>
<br />
<CodeGroup title="Respuesta">
```json {{ title: '200' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "string",
"date": "2021-09-21T09:34:48-05:00"
},
"data": {
"requestId": "9bd89c8d-6097-4d69-8ce9-d9b5ec35d8ea",
"redirectUrl": "https://account-validator.placetopay.com/verification/redirect/9bd89c8d-6097-4d69-8ce9-d9b5ec35d8ea",
"expiresAt": "2024-04-19 17:36:57"
}
}
```
```json {{ title: '400' }}
{
"status": {
"status": "FAILED",
"reason": "BR",
"message": "El campo user.email es obligatorio.",
"date": "2024-04-19T20:15:04+00:00"
},
}
```
</CodeGroup>
</Col>
</Row>

---

## Consultar estado de sesión {{ id: 'check-session-status', tag: 'POST', label: '/api/verification/query' }}

Este endpoint te permitirá consultar el estado de la sesión creada.

<Note>
La información de la cuenta solo se mostrará los primeros 10 minutos, sí solo si, la verificación de cuenta fue exitosa..
</Note>

### Posibles estados

Nombre | Descripción
---------|----------
APPROVED | La cuenta fue verificada exitosamente.
REJECTED | La verificación de cuenta fue rechazada.
FAILED | Ha ocurrido un error en el sistema.
PENDING | La verificación de cuenta está en proceso.


### Razones de estado

Código | Descripción
---------|----------
?C | La verificación ha sido cancelada por el usuario.
05 | La verificación ha sido rechazada por razones generales.
BR | Los datos de la solicitud han sido incorrectos.
00 | La verificación ha sido realizada con éxito.
?- | La verificación está en proceso de validación.
38 | Número de intentos agotado.
HX | Ha ocurrido un error en el servicio.
X3 | La información suministrada es inválida.
X5 | Número de seguridad social Inválido.
XN | Número de cuenta inválido.
?* | Pendiente de validación por microdepositos.

<Row>
<Col>
<ApiReader
path="/api/check-session-status"
method="post"
api={props.refs}
/>
</Col>

<Col sticky>
<CodeGroup title="Solicitud" tag="POST" label="api/verification/query">
```bash {{ title: 'cURL' }}
curl -X "POST" https://checkout-test.placetopay.com/api/verification/query \
-H "Content-Type: application/json" \
-d '{
"auth": {
"login": "5991de4fa93bcd7b28cf5100c25099e1",
"tranKey": "OoamCdSidq121234430nH5x94yxd4=",
"nonce": "NG5vejc2b41xdm8=",
"seed": "2024-04-19T12:06:56-05:00"
},
"requestId": "1f630ff7-9c02-4da4-82d4-d676709acb21"
}'
```
</CodeGroup>
</Col>
</Row>

<Row>
<Col>
<ApiReader
path="/api/check-session-status"
method="post"
type="response"
api={props.refs}
/>
</Col>

<Col sticky>
<br />
<CodeGroup title="Respuesta">
```json {{ title: '200' }}
{
"status": {
"status": "PENDING",
"reason": "?-",
"message": "La solicitud está pendiente",
"date": "2022-08-30T18:33:25+00:00"
},
"data": {
"requestId": "9bd8e975-c793-4888-afa7-15faee550fa5",
"expiresAt": "2024-04-19 21:12:00"
}
}
```
```json {{ title: '400' }}
{
"status": {
"status": "REJECTED",
"reason": "BR",
"message": "There are no results for the query",
"date": "2024-04-19T21:11:09+00:00"
}
}
```
</CodeGroup>
</Col>
</Row>

Loading

0 comments on commit 338443b

Please sign in to comment.