The Mercado Pago API is not returning data when the external_reference parameter is indicated.
Testing the following by console:
/collections/search?external_reference=2016-11-renovar-abono-7761&range=date_created&begin_date=2016-10-01T00%3A00%3A00.000-03%3A00&end_date=2017-02-01T23%3A59%3A59.000-03%3A00&offset=0&limit=0&access_token=[eltoken]
Return:
{
"paging": {
"total": 4,
"limit": 0,
"offset": 0
},
"results": []
}
This call should return at least one movement and the proof of it is given when I execute the same but without external_reference :
/collections/search?range=date_created&begin_date=2016-10-01T00%3A00%3A00.000-03%3A00&end_date=2017-02-01T23%3A59%3A59.000-03%3A00&offset=0&limit=0&access_token=[eltoken]
Return:
{
"paging": {
"total": 1,
"limit": 10,
"offset": 0
},
"results": [{
"collection": {
"id": 2471392144,
"site_id": "MLA",
"date_created": "2016-12-01T13:27:58.000-04:00",
"date_approved": null,
"last_modified": "2016-12-01T13:29:12.000-04:00",
"money_release_date": null,
"operation_type": "regular_payment",
"collector_id": 78381283,
"sponsor_id": null,
"payer": { ... },
"external_reference": "2016-11-renovar-abono-7761",
...
}
}]
}
How can I get the result to return the external_reference?
Edited
-
Using the SDK for PHP version 0.5.2
-
Method $ api-> search_payment
-
The uri generated by this method is /collections/search?external_reference=2016-11-renovate-abono-7761&range=date_created&begin_date=2016-10-03T00%3A00%3A00.000-03% 3A00 & end_date = 2017-02-03T23% 3A59% 3A59.000-03% 3A00 & offset = 0 & limit = 0