I'm having a problem, that by generating a payment preference with this JSON:
{
"items":[
{
"title":"pago 3 anticipo",
"category_id":null,
"quantity":1,
"currency_id":"ARS",
"unit_price":1250.0
}
],
"back_urls":{
"success":"http://localhost:54815/paymentSuccess",
"pending":"http://localhost:54815/paymentPending",
"failure":"http://localhost:54815/paymentFailure"
}
}
Sometimes a 201 (OK) returns, but other times it returns 400 with the code invalid_items
.
My code is as follows (C #):
MP mp = new MP(CLIENT_ID, CLIENT_SECRET);
mp.sandboxMode(true);
string sJson = getBodyJason();
Hashtable Hashpreference = mp.createPreference(sJson);