Page MenuHomeDatingVIP

items.list
Updated 3,348 Days AgoPublic

Version 1 of 2: You are viewing an older version of this document, as it appeared on Mar 11 2015, 13:27.

items.list

Description

Retrieve items list

Input Parameters
NameTypeRequiredDescription
item_idmixed (int|array)noItem ID(s)
pageintnoShow only results on specified page
limitintnoRestrict number of results per page
on_datestringnoShow results occurred on specified date
from_datestringnoShow results from specified date
to_datestringnoShow results until specified date
nocachebooleannoChoose whether results should be cached or not
tracking_tagmixed (int|array)noShow results with specified client side tracking tag(s)
tracking_ordermixed (int|array)noShow results with specified client side order ID(s)
currencystringnoShow results with specified currency
tracking_usermixed (int|array)noShow results with specified partner user ID(s)
statusmixed (string|array)noShow results with specified order status
order_idmixed (int|array)noShow results with specified order ID(s)
countrymixed (string|array)noShow results having specified countries
ipmixed (string|array)noShow only results having specified IP address(es)
hostmixed (string|array)noShow only results having specified host name(s)
pp_typemixed (string|array)noShow results having specified processor type(s)
Return
NameTypeDescription
resultarrayResult array 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://dev-payment.datingvip.com';
$timeout 	= 30;

//generate post data
$post_data = array
(
	'token'		=> 'some-token',
	'password'	=> '130d04b80a4196857e47b254ebfbb53f',
	'command'	=> 'items.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 'items.list' (length=10)
  'result' => 
    array (size=1)
      0 => 
        array (size=24)
          'item_id' => string '5' (length=1)
          'order_id' => string '5' (length=1)
          'amount' => string '24.99' (length=5)
          'trial_amount' => string '0.00' (length=4)
          'trial_unit' => string 'day' (length=3)
          'trial_period' => string '0' (length=1)
          'rebill_unit' => string 'month' (length=5)
          'rebill_period' => string '1' (length=1)
          'max_rebill_count' => string '-1' (length=2)
          'description' => string 'Monthly subscription 24.99 USD with 5 days 2.99 trial and unlimited rebills' (length=75)
          'tracking_item' => string '1' (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 'EUR' (length=3)
          'date' => string '1399651800' (length=10)
          'order_status' => string 'init' (length=4)
          'country' => string 'NL' (length=2)
          'ip' => string '127.0.0.1' (length=9)
          'host' => string 'whatever.dinke.net' (length=18)
  'request' => 
    array (size=4)
      'token' => string 'some-token' (length=30)
      'password' => string '130d04b80a4196857e47b254ebfbb53f' (length=32)
      'command' => string 'items.list' (length=10)
      'data' => 
        array (size=1)
          'limit' => string '1' (length=1)
  'ts' => int 1399657467
  'origin_ip' => boolean false
  'debug' => null
  'errors' => null
Last Author
boris
Last Edited
Mar 11 2015, 13:27

Event Timeline

boris moved this document from Unknown Object (Phriction Wiki Document).Mar 11 2015, 13:27
boris changed the visibility from "Public (No Login Required)" to "All Users".
boris changed the visibility from "All Users" to "Public (No Login Required)".
boris shifted this object from the Restricted Space space to the S6 Everyone space.Aug 8 2018, 08:22