items.list
items.list
items.list
Description
Retrieve items list
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
item_id | mixed (int|array) | no | Item ID(s) |
page | int | no | Show only results on specified page |
limit | int | no | Restrict number of results per page |
on_date | string | no | Show results occurred on specified date |
from_date | string | no | Show results from specified date |
to_date | string | no | Show results until specified date |
nocache | boolean | 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 | string | no | Show results with specified currency |
tracking_user | mixed (int|array) | no | Show results with specified partner user ID(s) |
status | mixed (string|array) | no | Show results with specified order status |
order_id | mixed (int|array) | no | Show results with specified order ID(s) |
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) |
Return
Name | Type | Description |
---|---|---|
result | array | Result array with data |
Usage Example
<?php $curl = new \Dinke\CurlHttpClient; //setup payment url and timeout $payment_url = 'https://dev-payment.datingvip.com/api.json'; $timeout = 30; $curl->setCredentials('some-token', 'some-pass'); $post_data = array( 'cmd' => 'items.list', 'data' => array('limit' => 1) ); $response = $curl->sendPostData($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=1) 'result' => array (size=8) 'code' => int 700 'status' => string 'Action completed succesfully' (length=28) 'command' => string 'items.list' (length=10) 'result' => array (size=1) 0 => array (size=25) 'item_id' => string '20564' (length=5) 'order_id' => string '565' (length=3) 'amount' => string '24.99' (length=5) 'trial_amount' => string '0.99' (length=4) 'trial_unit' => string 'day' (length=3) 'trial_period' => string '5' (length=1) 'rebill_unit' => string 'month' (length=5) 'rebill_period' => string '1' (length=1) 'max_rebill_count' => string '-1' (length=2) 'description' => string '5 days 0.99 trial, rebills monthly with 24.99 and unlimited rebills' (length=67) 'tracking_item' => string '1' (length=1) 'uprc_id' => string '0' (length=1) 'processor' => string 'RG' (length=2) 'tracking_user' => string '1' (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) 'currency' => string 'USD' (length=3) 'date' => string '1429542524' (length=10) 'order_status' => string 'failed' (length=6) 'country' => string 'US' (length=2) 'ip' => string '127.0.0.1' (length=9) 'host' => string 'whatever.dinke.net' (length=18) 'request' => array (size=4) 'cmd' => string 'items.list' (length=10) 'data' => array (size=1) 'limit' => string '1' (length=1) 'token' => string 'some-token' (length=26) 'pass' => string 'some-pass' (length=32) 'ts' => int 1429545358 'origin_ip' => string '93.87.220.184' (length=13) 'errors' => null
Referenced Files
None
Subscribers
None
- Last Author
- • dinke
- Last Edited
- Apr 20 2015, 11:57