orders.change
orders.change
orders.change
Description
Update existing order (only tracking_tag currently)
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
order_id | int | Yes | Order Id |
tracking_tag | string | Yes | Tracking tag |
Returned
Array with these data in each array
Name | Type | Description |
---|---|---|
result | boolean | Returns true on success false on failure |
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' => 'orders.change', 'data' => array( 'tracking_tag' => '123', 'order_id' => '393' ) ); $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=9) 'code' => int 700 'status' => string 'Action completed succesfully' (length=28) 'command' => string 'cards.update' (length=12) 'result' => boolean true 'request' => array (size=4) 'token' => string 'some-token' (length=10) 'password' => string 'some-pass' (length=32) 'command' => string 'cards.update' (length=12) 'data' => array (size=7) 'tracking_tag' => string '123' (length=1) 'order_id' => string '393' (length=1) 'ts' => int 1399652185 'origin_ip' => boolean false 'debug' => null 'errors' => null
Referenced Files
None
Subscribers
None
- Last Author
- aplawecki
- Last Edited
- Sep 6 2019, 07:41