Code 400 when generating preference

0

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);
    
asked by Enzo 10.04.2017 в 14:09
source

0 answers