Hello, I am developing a payment gateway with ruby on rails and a paid market and I have the following question
This is what I have developed in my controller
$mp = MercadoPago.new('XXXXXX', 'XXXXXX')
preference_data = {
"items": [
{
"title": "Prueba",
"quantity": 4,
"unit_price": 10.2,
"currency_id": "MXN"
}
]
}
@preference = $mp.create_preference(preference_data)
That answers me with a json that takes me to the sandbox mode, already there I want to test with an account that previously believes in the following way
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=XXXXX' -d 'client_secret=XXXXXXX' | grep -o '"access_token":"[^"]*"' | sed -n 's/.*"access_token":"\(.*\)"//p''
curl -X POST \
-H "Content-Type: application/json" \
"https://api.mercadopago.com/users/test_user?access_token=$AT" \
-d '{"site_id":"MLM"}'
When I make the request this is what returns me
Now in sandbox I want to make the payment with the test cards but being signed with the test account and I can not do it
If I'm not signed if I can make the payment and add any email and everything works fine
My question is how do I simulate payments between two accounts?
IMPORTANT I have already obtained the credentials of each user
"access_token": "MARKETPLACE_SELLER_TOKEN",
"token_type": "bearer",
"expires_in": 15552000,
"scope": "offline_access read write",
"refresh_token": "TG-XXXXXXXX"