== orders.list ==
==== Description ====
Retrieve orders list
==== Input Parameters ====
<table>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
<tr><td>order_id</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified order ID(s)</td></tr>
<tr><td>item_id</td><td>mixed (int|array) Item ID(s)</td><td>no</td><td>related to order</td></tr>
<tr><td>page</td><td>(int)</td><td>no</td><td>Show only results on specified page</td></tr>
<tr><td>limit</td><td>(int)</td><td>no</td><td>Restrict results per page</td></tr>
<tr><td>on_date</td><td>(string)</td><td>no</td><td>Show results occured on specified date</td></tr>
<tr><td>from_date</td><td>(string)</td><td>no</td><td>Show results from specified date</td></tr>
<tr><td>to_date</td><td>(string)</td><td>no</td><td>Show results until specidied date</td></tr>
<tr><td>from_id</td><td>(int) Show results with ID(s)</td><td>no</td><td>higher than specified</td></tr>
<tr><td>to_id</td><td>(int) Show results with ID(s)</td><td>no</td><td>lower than specified</td></tr>
<tr><td>nocache</td><td>(bool)</td><td>no</td><td>Choose whether results should be cached or not</td></tr>
<tr><td>tracking_tag</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side tracking tag(s)</td></tr>
<tr><td>tracking_order</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side order ID(s)</td></tr>
<tr><td>currency</td><td>mixed (string|array)</td><td>no</td><td>Show results with specified currency</td></tr>
<tr><td>tracking_user</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side user ID(s)</td></tr>
<tr><td>status</td><td>mixed (string|array)</td><td>no</td><td>Show results with specified order status</td></tr>
<tr><td>country</td><td>mixed (string|array)</td><td>no</td><td>Show results having specified countries</td></tr>
<tr><td>ip</td><td>mixed (string|array)</td><td>no</td><td>Show only results having specified IP address(es)</td></tr>
<tr><td>host</td><td>mixed (string|array)</td><td>no</td><td>Show only results having specified host name(s)</td></tr>
<tr><td>pp_type</td><td>mixed (string|array)</td><td>no</td><td>Show results having specified processor type(s)</td></tr>
<tr><td>name</td><td>(string*)</td><td>no</td><td>Show results having specified user name</td></tr>
<tr><td>ccnum</td><td>(string*)</td><td>no</td><td>Show results having specified credit card number</td></tr>
</table>
==== Return ====
Return
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>result with data</td></tr>
</table>
==== Usage Example ====
```
<?php
require_once "curl_http_client/curl_http_csrc/CurlHttpClient.php";
$curl = new \Dinke\Curl_HTTP_HttpClient();;
//setup payment url and timeout
$payment_url = 'https://dev-payment.datingvip.com/api.json';
$timeout = 30;
//generate post data$curl->setCredentials('some-token', 'some-pass');
$post_data = array
(
'token' => 'some-token',
'password' => '130d04b80a4196857e47b254ebfbb53f',
'comman'cmd' => 'orders.list',
'data' => array('limit' => 1)
);
$response = $curl->send_post_dPostData($payment_url, $post_data, null, $timeout);
if($response === false)
{
//handle errors
}
//decode json to get array
$response = json_decode($response, true);
var_dump($response);
```
Excepted output after running this script should be:
```
array (size=91)
'result' =>
array (size=8)
'code' => int 700
'status' => string 'Action completed succesfully' (length=28)
'command' => string 'orders.list' (length=11)
'result' =>
array (size=1)
0 =>
array (size=2237)
'amount 'order_id' => string '24.99565' (length=53)
'tran 'ptnr_id' => string '155' (length=12)
'currency 'user_id' => string 'EUR455' (length=3)
'order 'pp_id' => string '36' (length=1)
'tracking_tag 'ppac_id' => string '1409' (length=23)
'force_mid' => string '' (length=0)
'ccdt_id' => string '0' (length=1)
'tracking_order' => string '0' (length=1)
'tracking_tag' => string '14' (length=2)
'first_name' => string 'Dragan' (length=6)
'last_name' => string 'Dinic' (length=5)
'street' => string '' (length=0)
'city' => string '' (length=0)
'state' => string '' (length=0)
'zipcode' => string '34000' (length=5)
'country' => string 'US' (length=2)
'email' => string 'dragan@dinke.net' (length=16)
'date 'ip' => string '139956364027.0.0.1' (length=109)
'order_status 'host' => string 'completedwhatever.dinke.net' (length=918)
'hash 'currency' => string '13995636282866c87677c50d9bd43782USD' (length=32)
'street 'hash' => string '1429542388626afa413c7f8651385ee2' (length=032)
'city 'rebill_transaction_id' => string '0' (length=01)
'zipcode 'order_status' => string '34000failed' (length=56)
'state 'ts' => string '1429542524' (length=010)
'country 'type' => string 'NLbasic' (length=25)
'pp_id 'step_down' => string '60' (length=1)
'pay_user_id 'tax_rate' => string '20.00' (length=14)
'items' =>
array (size=1 'tax_amount' => string '0.00' (length=4)
0'u_email' => string '3dragan@dinke.net' (length=16)
'tracking_user' => string '1' (length=1)
'pay_user_id' => string '455' (length=3)
'p_name' => string 'Dating Backend' (length=14)
'processor' => string 'RG' (length=2)
'request' = 'items' =>
array (size=41)
'token' 0 => string 'some-token20564' (length=105)
'password 'name' => string '130d04b80a4196857e47b254ebfbb53fDating Backend' (length=3214)
'command 'upgrade_retry' => string 'orders.listng '0' (length=1)
'upgrade_retry_plan' => string '' (length=110)
'data' ='request' =>
array (size=4)
'cmd' => string 'orders.list' (length=11)
'data' =>
array (size=1)
'limit' => string '1' (length=1)
'ts 'token' => int 1399659606string 'some-token' (length=26)
'origin_ip 'pass' => boolean falsestring 'some-pass' (length=32)
'debug 'ts' => nullint 1429557997
'origin_ip' => string '93.87.220.184' (length=13)
'errors' => null
```