Phriction DatingVIP Public Payment Application Project API Documentation users.changetrackingusers (REMOVED) History Version 1 vs 2
Version 1 vs 2
Version 1 vs 2
Content Changes
Content Changes
== users.changetrackingusers ==
==== Description ====
Update users tracking_user value.
Works only for currently authorized ptnr_id (via auth)
==== Input Parameters ====
<table>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
<tr><td>tracking_users</td><td>(array)</td><td>yes</td><td>old_tracking_user => new_tracking_user</td></tr>
</table>
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>Result contains array of tracking_user(s) divided by status ('success' and 'errors')</td></tr>
</table>
==== Usage Example ====
```
<?php
//setup payment url and timeout
$payment_url = 'https://payment.dvipdev.com/api.json';
$timeout = 30;
$curl->setCredentials('some-token', 'some-pass');
$post_data = array(
'cmd' => 'users.change.trackingusers
'data' => ['tracking_users' => [125 => 14, 16806041 => 141]]
);
$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:
```
{
"result": {
"code": 700,
"status": "Action completed successfully",
"command": "users.change.trackingusers",
"result": {
"success": [
"6806041"
],
"errors": {
"exists": [
"14"
],
"not_found": [
"141"
]
}
},
"request": {
"cmd": "users.change.trackingusers",
"data": {
"tracking_users": {
"125": "14",
"141": "6806041",
"1": "141"
}
},
"token": "",
"pass": ""
},
"ts": 1527077858,
"origin_ip": false,
"errors": null
}
}
```
== //users.changetrackingusers// ==
==== Description ====
This command has been recently REMOVED
Update users tracking_user value.
Works only for currently authorized ptnr_id (via auth)
==== Input Parameters ====
<table>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
<tr><td>tracking_users</td><td>(array)</td><td>yes</td><td>old_tracking_user => new_tracking_user</td></tr>
</table>
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>Result contains array of tracking_user(s) divided by status ('success' and 'errors')</td></tr>
</table>
==== Usage Example ====
```
<?php
//setup payment url and timeout
$payment_url = 'https://payment.dvipdev.com/api.json';
$timeout = 30;
$curl->setCredentials('some-token', 'some-pass');
$post_data = array(
'cmd' => 'users.change.trackingusers
'data' => ['tracking_users' => [125 => 14, 16806041 => 141]]
);
$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:
```
{
"result": {
"code": 700,
"status": "Action completed successfully",
"command": "users.change.trackingusers",
"result": {
"success": [
"6806041"
],
"errors": {
"exists": [
"14"
],
"not_found": [
"141"
]
}
},
"request": {
"cmd": "users.change.trackingusers",
"data": {
"tracking_users": {
"125": "14",
"141": "6806041",
"1": "141"
}
},
"token": "",
"pass": ""
},
"ts": 1527077858,
"origin_ip": false,
"errors": null
}
}
```
== == //users.changetrackingusers ==// ==
==== Description ====
This command has been recently REMOVED
Update users tracking_user value.
Works only for currently authorized ptnr_id (via auth)
==== Input Parameters ====
<table>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
<tr><td>tracking_users</td><td>(array)</td><td>yes</td><td>old_tracking_user => new_tracking_user</td></tr>
</table>
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>Result contains array of tracking_user(s) divided by status ('success' and 'errors')</td></tr>
</table>
==== Usage Example ====
```
<?php
//setup payment url and timeout
$payment_url = 'https://payment.dvipdev.com/api.json';
$timeout = 30;
$curl->setCredentials('some-token', 'some-pass');
$post_data = array(
'cmd' => 'users.change.trackingusers
'data' => ['tracking_users' => [125 => 14, 16806041 => 141]]
);
$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:
```
{
"result": {
"code": 700,
"status": "Action completed successfully",
"command": "users.change.trackingusers",
"result": {
"success": [
"6806041"
],
"errors": {
"exists": [
"14"
],
"not_found": [
"141"
]
}
},
"request": {
"cmd": "users.change.trackingusers",
"data": {
"tracking_users": {
"125": "14",
"141": "6806041",
"1": "141"
}
},
"token": "",
"pass": ""
},
"ts": 1527077858,
"origin_ip": false,
"errors": null
}
}
```