Page MenuHomeHelloSingles

api.commands
Updated 3,457 Days AgoPublic

api.commands

Description

Returns list of implemented commands

Input Parameters

None

Return
NameTypeDescription
resultarrayList with implemented commands
Usage Example
<?php
require_once "curl_http_client/src/CurlHttpClient.php";
$curl = new \Dinke\CurlHttpClient;

//setup payment url and timeout
$payment_url = 'https://dev-payment.datingvip.com/api.json';
$timeout 	= 30;

//generate post data
$post_data = array
(
	'cmd'	=> 'api.help',
	'data'	=> array('cmd' => 'api.commands')
);

$curl->setCredentials('some-token', 'some-pass');

$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 'api.commands' (length=12)
      'result' => 
        array (size=48)
          0 => string 'api.client.log' (length=14)
          1 => string 'api.commands' (length=12)
          2 => string 'api.help' (length=8)
          3 => string 'api.server.log' (length=14)
          4 => string 'api.statuscodes' (length=15)
          5 => string 'api.version' (length=11)
          6 => string 'cards.add' (length=9)
          7 => string 'cards.info' (length=10)
          8 => string 'cards.list' (length=10)
          9 => string 'cards.update' (length=12)
          10 => string 'dm.get.flow' (length=11)
          11 => string 'dm.get.init' (length=11)
          12 => string 'do.get.details' (length=14)
          13 => string 'gp.revoke' (length=9)
          14 => string 'items.list' (length=10)
          15 => string 'notifications.hash.validate' (length=27)
          16 => string 'orders.lastid' (length=13)
          17 => string 'orders.list' (length=11)
          18 => string 'overrides.delete' (length=16)
          19 => string 'overrides.list' (length=14)
          20 => string 'overrides.types' (length=15)
          21 => string 'overrides.update' (length=16)
          22 => string 'partner.info' (length=12)
          23 => string 'partner.ip.add' (length=14)
          24 => string 'partner.ip.del' (length=14)
          25 => string 'partner.ip.list' (length=15)
          26 => string 'partner.password.set' (length=20)
          27 => string 'processor.accounts' (length=18)
          28 => string 'processor.list' (length=14)
          29 => string 'processor.merchant.info' (length=23)
          30 => string 'pw.payment.systems' (length=18)
          31 => string 'subscription.cancel' (length=19)
          32 => string 'subscription.change' (length=19)
          33 => string 'subscription.lastid' (length=19)
          34 => string 'subscription.list' (length=17)
          35 => string 'subscription.reactivate' (length=23)
          36 => string 'subscription.rebill' (length=19)
          37 => string 'transaction.chargeback' (length=22)
          38 => string 'transaction.delete.chargeback' (length=29)
          39 => string 'transaction.finish' (length=18)
          40 => string 'transaction.init' (length=16)
          41 => string 'transaction.lastid' (length=18)
          42 => string 'transaction.list' (length=16)
          43 => string 'transaction.listsub' (length=19)
          44 => string 'transaction.refund' (length=18)
          45 => string 'transaction.update' (length=18)
          46 => string 'transaction.verify' (length=18)
          47 => string 'users.search' (length=12)
      'request' => 
        array (size=4)
          'cmd' => string 'api.commands' (length=12)
          'token' => string 'some-token' (length=26)
          'pass' => string 'some-pass' (length=32)
          'prefixes' => string 'api' (length=3)
      'ts' => int 1429543494
      'origin_ip' => string '93.87.220.184' (length=13)
      'errors' => null
Last Author
dinke
Last Edited
Apr 20 2016, 14:39

Event Timeline

boris moved this document from Unknown Object (Phriction Wiki Document).Mar 11 2015, 13:23
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:21