Skip to content

Commit

Permalink
Merge pull request #697 from mercadopago/fix/create_test_users_mkt
Browse files Browse the repository at this point in the history
Fix creation test users on Checkout Marketplace
  • Loading branch information
juones authored May 5, 2020
2 parents e9d72d3 + 9963f40 commit 8c28e98
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 33 deletions.
18 changes: 7 additions & 11 deletions guides/marketplace/web-checkout/testing-marketplace.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,19 @@ To simulate the entire payment process, you must create 3 test users: **marketpl

You must make the following API request to create each of the users.

Use the *site_id* to indicate the country where you want to run the test. Argentina: **MLA**, Brazil: **MLB**, Mexico: **MLM**, Chile: **MLC**, Uruguay: **MLU**, Peru: **MPE** and Colombia: **MCO**.
### Request

##### Request
```curl
# Get access token
AT=`curl -s -X POST -H 'content-type: application/x-www-form-urlencoded' 'https://api.mercadopago.com/oauth/token'
-d 'grant_type=client_credentials'
-d 'client_id=CLIENT_ID'
-d 'client_secret=CLIENT_SECRET' | grep -o '"access_token":"[^"]*"' | sed -n 's/.*"access_token":"\(.*\)"/\1/p'`
curl -X POST \
-H "Content-Type: application/json" \
"https://api.mercadopago.com/users/test_user?access_token=$AT" \
"https://api.mercadopago.com/users/test_user?access_token=ACCESS_TOKEN" \
-d '{"site_id":"[FAKER][GLOBALIZE][UPPER_SITE_ID]"}'
```
##### Response
```curl


### Response

```json
{
"id": 123456,
"nickname": "TT123456",
Expand Down
18 changes: 7 additions & 11 deletions guides/marketplace/web-checkout/testing-marketplace.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,19 @@ Para simular el proceso de pago de punta a punta debes crear 3 usuarios de prueb

Debes efectuar la siguiente llamada a la API para crear cada uno de los usuarios.

Utiliza el dato *site_id* para indicar el país donde quieres realizar las pruebas. Argentina: **MLA**, Brasil: **MLB**, México: **MLM**, Chile: **MLC**, Uruguay: **MLU**, Perú: **MPE** y Colombia: **MCO**.
### Solicitud

##### _Request_
```curl
# Get access token
AT=`curl -s -X POST -H 'content-type: application/x-www-form-urlencoded' 'https://api.mercadopago.com/oauth/token'
-d 'grant_type=client_credentials'
-d 'client_id=CLIENT_ID'
-d 'client_secret=CLIENT_SECRET' | grep -o '"access_token":"[^"]*"' | sed -n 's/.*"access_token":"\(.*\)"/\1/p'`
curl -X POST \
-H "Content-Type: application/json" \
"https://api.mercadopago.com/users/test_user?access_token=$AT" \
"https://api.mercadopago.com/users/test_user?access_token=ACCESS_TOKEN" \
-d '{"site_id":"[FAKER][GLOBALIZE][UPPER_SITE_ID]"}'
```
##### _Response_
```curl


### Respuesta

```json
{
"id": 123456,
"nickname": "TT123456",
Expand Down
17 changes: 6 additions & 11 deletions guides/marketplace/web-checkout/testing-marketplace.pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,18 @@ Para simular o processo de pagamento do começo ao fim, é necessário criar 3 u

Você deve fazer a seguinte requisição à API para criar cada um dos usuários.

Utilize o *site_id* para indicar o país de onde quer realizar os testes. Argentina: **MLA**, Brasil: **MLB**, México: **MLM**, Chile: **MLC**, Uruguai: **MLU**, Peru: **MPE** e Colômbia: **MCO**.
### Solicitação

##### Request
```curl
# Get access token
AT=`curl -s -X POST -H 'content-type: application/x-www-form-urlencoded' 'https://api.mercadopago.com/oauth/token'
-d 'grant_type=client_credentials'
-d 'client_id=CLIENT_ID'
-d 'client_secret=CLIENT_SECRET' | grep -o '"access_token":"[^"]*"' | sed -n 's/.*"access_token":"\(.*\)"/\1/p'`
curl -X POST \
-H "Content-Type: application/json" \
"https://api.mercadopago.com/users/test_user?access_token=$AT" \
"https://api.mercadopago.com/users/test_user?access_token=ACCESS_TOKEN" \
-d '{"site_id":"[FAKER][GLOBALIZE][UPPER_SITE_ID]"}'
```
##### Response
```curl

### Resposta

```json
{
"id": 123456,
"nickname": "TT123456",
Expand Down

0 comments on commit 8c28e98

Please sign in to comment.