Skip to content

Commit

Permalink
Merge pull request #108 from placetopay-org/feature/PT-5398-checkout-…
Browse files Browse the repository at this point in the history
…examples

feat: add more examples to checkout API Docs
  • Loading branch information
meiyerDev authored Sep 17, 2024
2 parents 4398385 + b90a1df commit ecbdf83
Show file tree
Hide file tree
Showing 4 changed files with 1,932 additions and 1,010 deletions.
218 changes: 109 additions & 109 deletions src/pages/checkout/api/reference/gateway-information.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,38 @@ export const apiRefs = ['/api/gateway/information']

<Col sticky>
<CodeGroup title="Solicitud" tag="POST" label="/api/gateway/information">
```bash {{ title: 'cURL' }}
curl -X "POST" https://checkout-test.placetopay.com/api/gateway/information \
-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": "Prueba",
"amount": {
"currency": "USD",
"total": 100
}
},
"instrument": {
"card": {
"number": "4110760000000008",
},
"token" : {
"token" : "f517475fd94ae67c84fe06593aaff5798ebf3a75664c2b6816024eb297be321e",
},
...
},
"ipAddress": "127.0.0.1",
"userAgent": "Testing"
}'
```
```bash {{ title: 'cURL' }}
curl -X "POST" https://checkout-test.placetopay.com/api/gateway/information \
-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": "Prueba",
"amount": {
"currency": "USD",
"total": 100
}
},
"instrument": {
"card": {
"number": "4110760000000008",
},
"token" : {
"token" : "f517475fd94ae67c84fe06593aaff5798ebf3a75664c2b6816024eb297be321e",
},
...
},
"ipAddress": "127.0.0.1",
"userAgent": "Testing"
}'
```
</CodeGroup>
</Col>
</Row>
Expand All @@ -64,85 +64,85 @@ export const apiRefs = ['/api/gateway/information']
<Col sticky>
<br />
<CodeGroup title="Respuesta">
```json {{ title: '200' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "La petición se ha procesado correctamente",
"date": "2021-09-21T09:26:11-05:00"
},
"provider": "CREDIBANCO",
"serviceCode": "CR_VS",
"cardType": "C",
"cardTypes": [
"C",
"R",
"A"
],
"displayInterest": false,
"requireOtp": false,
"requireCvv2": true,
"threeDS": "optional",
"credits": [
{
"description": "Cuotas",
"code": "0",
"groupCode": "C",
"type": "00",
"installments": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36
]
}
]
}
```
```json {{ title: '400' }}
```json {{ title: '200' }}
{
"status": {
"status": "OK",
"reason": "00",
"message": "La petición se ha procesado correctamente",
"date": "2021-09-21T09:26:11-05:00"
},
"provider": "CREDIBANCO",
"serviceCode": "CR_VS",
"cardType": "C",
"cardTypes": [
"C",
"R",
"A"
],
"displayInterest": false,
"requireOtp": false,
"requireCvv2": true,
"threeDS": "optional",
"credits": [
{
"status": {
"status": "FAILED",
"reason": "XN",
"reason": 400,
"message": "El token usado es inválido",
"date": "2021-11-30T15:12:25-05:00"
},
"description": "Cuotas",
"code": "0",
"groupCode": "C",
"type": "00",
"installments": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36
]
}
```
]
}
```
```json {{ title: '400' }}
{
"status": {
"status": "FAILED",
"reason": "XN",
"reason": 400,
"message": "El token usado es inválido",
"date": "2021-11-30T15:12:25-05:00"
},
}
```
</CodeGroup>
</Col>
</Row>
Loading

0 comments on commit ecbdf83

Please sign in to comment.