Phriction DatingVIP Public Payment Application Project API Documentation api.commands History Version 2 vs 3
Version 2 vs 3
Version 2 vs 3
Content Changes
Content Changes
== api.commands ==
==== Description ====
Returns list of implemented commands
==== Input Parameters ====
None
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>List with implemented commands</td></tr>
</table>
==== 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;
$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=50)
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 'chargeback_emails.list' (length=22)
11 => string 'chargeback_emails.update' (length=24)
12 => string 'dm.get.flow' (length=11)
13 => string 'dm.get.init' (length=11)
14 => string 'do.get.details' (length=14)
15 => string 'gp.revoke' (length=9)
16 => string 'items.list' (length=10)
17 => string 'items.statistics' (length=16)
18 => string 'notifications.hash.validate' (length=27)
19 => string 'orders.lastid' (length=13)
20 => string 'orders.list' (length=11)
21 => string 'overrides.delete' (length=16)
22 => string 'overrides.list' (length=14)
23 => string 'overrides.types' (length=15)
24 => string 'overrides.update' (length=16)
25 => string 'partner.info' (length=12)
26 => string 'partner.ip.add' (length=14)
27 => string 'partner.ip.del' (length=14)
28 => string 'partner.ip.list' (length=15)
29 => string 'partner.password.set' (length=20)
30 => string 'processor.accounts' (length=18)
31 => string 'processor.list' (length=14)
32 => string 'subscription.cancel' (length=19)
33 => string 'subscription.change' (length=19)
34 => string 'subscription.lastid' (length=19)
35 => string 'subscription.list' (length=17)
36 => string 'subscription.reactivate' (length=23)
37 => string 'subscription.rebill' (length=19)
38 => string 'subscription.statistics' (length=23)
39 => string 'transaction.chargeback' (length=22)
40 => string 'transaction.finish' (length=18)
41 => string 'transaction.init' (length=16)
42 => string 'transaction.lastid' (length=18)
43 => string 'transaction.list' (length=16)
44 => string 'transaction.listsub' (length=19)
45 => string 'transaction.refund' (length=18)
46 => string 'transaction.statistics' (length=22)
47 => string 'transaction.update' (length=18)
48 => string 'transaction.verify' (length=18)
49 => 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
```
== api.commands ==
==== Description ====
Returns list of implemented commands
==== Input Parameters ====
None
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>List with implemented commands</td></tr>
</table>
==== 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
```
== api.commands ==
==== Description ====
Returns list of implemented commands
==== Input Parameters ====
None
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>List with implemented commands</td></tr>
</table>
==== 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=5048)
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 'chargeback_emails.list' (length=22)
11 => string 'chargeback_emails.update' (length=24)
12 => string 'dm.get.flow' (length=11)
1311 => string 'dm.get.init' (length=11)
1412 => string 'do.get.details' (length=14)
1513 => string 'gp.revoke' (length=9)
1614 => string 'items.list' (length=10)
1715 => string 'items.statisticsnotifications.hash.validate' (length=1627)
1816 => string 'notifications.hash.validateorders.lastid' (length=2713)
1917 => string 'orders.lastidist' (length=131)
2018 => string 'orders.listverrides.delete' (length=116)
2119 => string 'overrides.deletelist' (length=164)
2220 => string 'overrides.listtypes' (length=145)
2321 => string 'overrides.typesupdate' (length=156)
2422 => string 'overrides.updatepartner.info' (length=162)
2523 => string 'partner.infop.add' (length=124)
2624 => string 'partner.ip.adddel' (length=14)
2725 => string 'partner.ip.dellist' (length=145)
2826 => string 'partner.ip.lispassword.set' (length=1520)
2927 => string 'partner.password.setrocessor.accounts' (length=2018)
3028 => string 'processor.accountslist' (length=184)
3129 => string 'processor.listmerchant.info' (length=1423)
3230 => string 'subscription.cancelpw.payment.systems' (length=198)
3331 => string 'subscription.changeancel' (length=19)
3432 => string 'subscription.lastidchange' (length=19)
3533 => string 'subscription.listastid' (length=179)
3634 => string 'subscription.reactivatelist' (length=2317)
3735 => string 'subscription.rebillactivate' (length=1923)
3836 => string 'subscription.statisticsrebill' (length=2319)
3937 => string 'transaction.chargeback' (length=22)
4038 => string 'transaction.finishdelete.chargeback' (length=1829)
4139 => string 'transaction.initfinish' (length=168)
4240 => string 'transaction.lastidinit' (length=186)
4341 => string 'transaction.listastid' (length=168)
4442 => string 'transaction.listsub' (length=196)
4543 => string 'transaction.refundlistsub' (length=189)
4644 => string 'transaction.statisticsrefund' (length=2218)
4745 => string 'transaction.update' (length=18)
4846 => string 'transaction.verify' (length=18)
4947 => 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
```