Skip to content

Commit

Permalink
Merge pull request #115 from placetopay-org/feature/gateway-examples
Browse files Browse the repository at this point in the history
feat: add gateway API docs examples to `en` version
  • Loading branch information
meiyerDev authored Oct 1, 2024
2 parents daaafc3 + 86c6c0d commit 770237c
Show file tree
Hide file tree
Showing 9 changed files with 2,044 additions and 1,338 deletions.
260 changes: 147 additions & 113 deletions src/pages/en/gateway/api/reference/3ds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@ export const apiRefs = ['/gateway/mpi/lookup', '/gateway/mpi/query']

<Col sticky>
<CodeGroup title="Solicitud" tag="POST" label="/gateway/mpi/lookup">
```bash {{ title: 'cURL' }}
curl -X "POST" https://api-co-dev.placetopay.ws/gateway/mpi/lookup \
-H "Content-Type: application/json" \
-d '{
"locale": "es_CO",
"auth": {
"login":"c51ce410c124a10e0db5e4b97fc2af39",
"tranKey":"VQOcRcVH2DfL6Y4B4SaK6yhoH/VOUveZ3xT16OQnvxE=",
"nonce":"NjE0OWVkODgwYjNhNw==",
"seed":"2021-09-21T09:34:48-05:00"
},
"payment": {
"reference": "1122334455",
"description": "Testing Payment",
"amount": {
"currency": "USD",
"total": 100
}
},
"instrument": {
"card": {
"number": "4110760000000008",
"expiration": "12/20",
"cvv": "123"
}
},
"returnUrl": "https://www.your-site.com/return?reference=1234567890"
}'
```
```bash {{ title: 'cURL' }}
curl -X "POST" https://api-co-dev.placetopay.ws/gateway/mpi/lookup \
-H "Content-Type: application/json" \
-d '{
"locale": "es_CO",
"auth": {
"login":"c51ce410c124a10e0db5e4b97fc2af39",
"tranKey":"VQOcRcVH2DfL6Y4B4SaK6yhoH/VOUveZ3xT16OQnvxE=",
"nonce":"NjE0OWVkODgwYjNhNw==",
"seed":"2021-09-21T09:34:48-05:00"
},
"payment": {
"reference": "1122334455",
"description": "Testing Payment",
"amount": {
"currency": "USD",
"total": 100
}
},
"instrument": {
"card": {
"number": "4110760000000008",
"expiration": "12/20",
"cvv": "123"
}
},
"returnUrl": "https://www.your-site.com/return?reference=1234567890"
}'
```
</CodeGroup>
</Col>
</Row>
Expand All @@ -63,24 +63,58 @@ export const apiRefs = ['/gateway/mpi/lookup', '/gateway/mpi/query']
<br />

<CodeGroup title="Respuesta">
```json {{ title: '200' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "La petición se ha procesado correctamente",
"date": "2021-09-21T11:40:03-05:00"
},
"data": {
"version": "v1",
"enrolled": "N",
"redirectUrl": ,
"identifier": ,
"eci": "07",
"formData": null
}
}
```
```json {{ title: 'Ejemplo v1' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "La petición se ha procesado correctamente",
"date": "2021-09-21T11:50:46-05:00"
},
"data": {
"version": "v1",
"enrolled": "Y",
"redirectUrl": "https://3ds-server-to-authenticate.com/3ds",
"identifier": "1",
"eci": null,
"formData": null
}
}
```
```json {{ title: 'Ejemplo v2' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "La petición se ha procesado correctamente",
"date": "2021-09-21T12:09:36-05:00"
},
"data": {
"version": "v2",
"sessionToken": "60",
"redirectUrl": "https://www.google.com",
"identifier": "12"
}
}
```
```json {{ title: 'No usa 3DS' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "La petición se ha procesado correctamente",
"date": "2021-09-21T11:40:03-05:00"
},
"data": {
"version": "v1",
"enrolled": "N",
"redirectUrl": null,
"identifier": null,
"eci": "07",
"formData": null
}
}
```
</CodeGroup>
</Col>
</Row>
Expand All @@ -106,26 +140,26 @@ export const apiRefs = ['/gateway/mpi/lookup', '/gateway/mpi/query']

<Col sticky>
<CodeGroup title="Solicitud" tag="POST" label="/gateway/mpi/query">
```bash {{ title: 'cURL' }}
curl -X "POST" https://api-co-dev.placetopay.ws/gateway/mpi/query \
-H "Content-Type: application/json" \
-d '{
"auth": {
"login":"c51ce410c124a10e0db5e4b97fc2af39",
"tranKey":"VQOcRcVH2DfL6Y4B4SaK6yhoH/VOUveZ3xT16OQnvxE=",
"nonce":"NjE0OWVkODgwYjNhNw==",
"seed":"2021-09-21T09:34:48-05:00"
},
"instrument": {
"card": {
"number": "4110760000000008",
"expiration": "12/20",
"cvv": "123"
}
},
"id": "1"
}'
```
```bash {{ title: 'cURL' }}
curl -X "POST" https://api-co-dev.placetopay.ws/gateway/mpi/query \
-H "Content-Type: application/json" \
-d '{
"auth": {
"login":"c51ce410c124a10e0db5e4b97fc2af39",
"tranKey":"VQOcRcVH2DfL6Y4B4SaK6yhoH/VOUveZ3xT16OQnvxE=",
"nonce":"NjE0OWVkODgwYjNhNw==",
"seed":"2021-09-21T09:34:48-05:00"
},
"instrument": {
"card": {
"number": "4110760000000008",
"expiration": "12/20",
"cvv": "123"
}
},
"id": "1"
}'
```
</CodeGroup>
</Col>
</Row>
Expand All @@ -144,52 +178,52 @@ export const apiRefs = ['/gateway/mpi/lookup', '/gateway/mpi/query']
<br />

<CodeGroup title="Respuesta">
```json {{ title: '200' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "La petición se ha procesado correctamente",
"date": "2021-09-21T11:40:03-05:00"
},
"data": {
"id": "1",
"enrolled": "Y",
"authenticated": "Y",
"validSignature": "true",
"eci": "05",
"cavv": "AAACCZJiUGVlF4U5AmJQEwAAAAA=",
"xid": "Z8UuHYF8Epz46M8V/MkGJDl2Y5E=",
"version": "v1"
}
}
```

```json {{ title: 'Transaction extra' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "La petición se ha procesado correctamente",
"date": "2021-09-21T11:40:03-05:00"
},
"data": {
"id": "1",
"enrolled": "Y",
"authenticated": "Y",
"validSignature": "true",
"eci": "05",
"cavv": "AAACCZJiUGVlF4U5AmJQEwAAAAA=",
"xid": "Z8UuHYF8Epz46M8V/MkGJDl2Y5E=",
"version": "v1",
"extra": {
"transStatusReason": null,
"acsTransId": "37a7b6e0-fd58-4e38-98de-79c70c526a47",
"threeDSServerTransID": "eadd3a60-b870-41d0-977f-921b3dbe6323/MkGJDl2Y5E="
}
}
}
```
```json {{ title: 'Ejemplo v1' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "La petición se ha procesado correctamente",
"date": "2021-09-21T11:40:03-05:00"
},
"data": {
"id": "1",
"enrolled": "Y",
"authenticated": "Y",
"validSignature": "true",
"eci": "05",
"cavv": "AAACCZJiUGVlF4U5AmJQEwAAAAA=",
"xid": "Z8UuHYF8Epz46M8V/MkGJDl2Y5E=",
"version": "v1"
}
}
```

```json {{ title: 'Ejemplo v2' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "La petición se ha procesado correctamente",
"date": "2021-09-21T11:40:03-05:00"
},
"data": {
"id": "1",
"enrolled": "Y",
"authenticated": "Y",
"validSignature": "true",
"eci": "05",
"cavv": "AAACCZJiUGVlF4U5AmJQEwAAAAA=",
"xid": "Z8UuHYF8Epz46M8V/MkGJDl2Y5E=",
"version": "v1",
"extra": {
"transStatusReason": null,
"acsTransId": "37a7b6e0-fd58-4e38-98de-79c70c526a47",
"threeDSServerTransID": "eadd3a60-b870-41d0-977f-921b3dbe6323/MkGJDl2Y5E="
}
}
}
```
</CodeGroup>
</Col>
</Row>
Loading

0 comments on commit 770237c

Please sign in to comment.