== subscription.rebill ==
==== Description ====
Manually execute rebill
==== Input Parameters ====
<table>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
<tr><td>item_id</td><td>int</td><td>yes</td><td>Item ID</td></tr>
<tr><td>rebill_amount</td><td>float</td><td>yes</td><td>Rebill amount</td></tr>
<tr><td>description</td><td>string</td><td>yes</td><td>Description</td></tr>
</table>
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>Array with transaction data</td></tr>
</table>
==== Usage Example ====
```
<?php
require_once "$curl_http_client/curl_http_client.php";
$curl = new = new \Dinke\Curl_HTTP_HttpClient();;
//setup payment url and timeout
$payment_url = 'https://dev-payment.datingvip.dev';com/api.json';
$timeout = 30;
//generate post data
$post_data = array
(
'$curl->setCredentials('some-token' =>, 'some-token',
'password' => '130d04b80a4196857e47b254ebfbb53f',');
$post_data = array(
'comman'cmd' => 'subscription.rebill',
'data' => array('item_id' => 31,
'rebill_amount' => 25.35,
'description' => 'This is dinke testing manual rebill')
);
$response = $curl->send_post_dPostData($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 'subscription.rebill' (length=19)
'result' =>
array (size=9)
'success' => boolean true
'error_msg' => string '' (length=0)
'rg_guid_no' => string '1000145F14EBF41' (length=15)
'remote_tran_id' => string '1000145F14EBF41' (length=15)
'payment_tran_id' => int 3
'rg_merchant_id' => string '1358984622' (length=10)
'rg_customer_id' => string 'M1_1' (length=4)
'rg_cc_hash' => string '8DoHBzr/OzoLDD3ZjNcJpAYKkhX5E240yaPc7l2d2/Y=' (length=44)
'tran_id' => int 3
'request' =>
array (size=4)
'token' => string 'some-token' (length=30)
'password' => string '130d04b80a4196857e47b254ebfbb53f' (length=32)
'command' => string 'subscription.rebill' (length=19)
'data' =>
array (size=3)
'item_id' => string '3' (length=1)
'rebill_amount' => string '25.35' (length=5)
'description' => string 'This is dinke testing manual rebill' (length=35)
'ts' => int 1399912839
'origin_ip' => boolean false
'debug' => null
'errors' => null
```