orders.list
orders.list
orders.list
Description
Retrieve orders list
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
order_id | mixed (int|array) | no | Show results with specified order ID(s) |
item_id | mixed (int|array) Item ID(s) | no | related to order |
page | (int) | no | Show only results on specified page |
limit | (int) | no | Restrict results per page |
on_date | (string) | no | Show results occured on specified date |
from_date | (string) | no | Show results from specified date |
to_date | (string) | no | Show results until specidied date |
from_id | (int) Show results with ID(s) | no | higher than specified |
to_id | (int) Show results with ID(s) | no | lower than specified |
nocache | (bool) | no | Choose whether results should be cached or not |
tracking_tag | mixed (int|array) | no | Show results with specified client side tracking tag(s) |
tracking_order | mixed (int|array) | no | Show results with specified client side order ID(s) |
currency | mixed (string|array) | no | Show results with specified currency |
tracking_user | mixed (int|array) | no | Show results with specified client side user ID(s) |
status | mixed (string|array) | no | Show results with specified order status |
country | mixed (string|array) | no | Show results having specified countries |
ip | mixed (string|array) | no | Show only results having specified IP address(es) |
host | mixed (string|array) | no | Show only results having specified host name(s) |
pp_type | mixed (string|array) | no | Show results having specified processor type(s) |
name | (string*) | no | Show results having specified user name |
ccnum | (string*) | no | Show results having specified credit card number |
Return
Return
Name | Type | Description |
---|---|---|
result | array | result with data |
Usage Example
<?php require_once "curl_http_client/curl_http_client.php"; $curl = new Curl_HTTP_Client(); //setup payment url and timeout $payment_url = 'https://payment.datingvip.dev'; $timeout = 30; //generate post data $post_data = array ( 'token' => 'some-token', 'password' => '130d04b80a4196857e47b254ebfbb53f', 'command' => 'orders.list', 'data' => array('limit' => 1) ); $response = $curl->send_post_data($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=9) 'code' => int 700 'status' => string 'Action completed succesfully' (length=28) 'command' => string 'orders.list' (length=11) 'result' => array (size=1) 0 => array (size=22) 'amount' => string '24.99' (length=5) 'tran_id' => string '1' (length=1) 'currency' => string 'EUR' (length=3) 'order_id' => string '3' (length=1) 'tracking_tag' => string '14' (length=2) 'tracking_order' => string '0' (length=1) 'first_name' => string 'Dragan' (length=6) 'last_name' => string 'Dinic' (length=5) 'email' => string 'dragan@dinke.net' (length=16) 'date' => string '1399563640' (length=10) 'order_status' => string 'completed' (length=9) 'hash' => string '13995636282866c87677c50d9bd43782' (length=32) 'street' => string '' (length=0) 'city' => string '' (length=0) 'zipcode' => string '34000' (length=5) 'state' => string '' (length=0) 'country' => string 'NL' (length=2) 'pp_id' => string '6' (length=1) 'pay_user_id' => string '2' (length=1) 'items' => array (size=1) 0 => string '3' (length=1) 'tracking_user' => string '1' (length=1) 'processor' => string 'RG' (length=2) 'request' => array (size=4) 'token' => string 'some-token' (length=10) 'password' => string '130d04b80a4196857e47b254ebfbb53f' (length=32) 'command' => string 'orders.list' (length=11) 'data' => array (size=1) 'limit' => string '1' (length=1) 'ts' => int 1399659606 'origin_ip' => boolean false 'debug' => null 'errors' => null
Referenced Files
None
Subscribers
None
- Last Author
- boris
- Last Edited
- Mar 11 2015, 13:28