subscription.rebill
subscription.rebill
subscription.rebill
Description
Manually execute rebill
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
item_id | int | yes | Item ID |
rebill_amount | float | yes | Rebill amount |
description | string | yes | Description |
Return
Name | Type | Description |
---|---|---|
result | array | Array with transaction data |
Usage Example
<?php require_once "curl_http_client/curl_http_client.php"; $curl = new Curl_HTTP_Client(); //setup payment url and timeout $payment_url = 'https://payment.datingvip.dev'; $timeout = 30; //generate post data $post_data = array ( 'token' => 'some-token', 'password' => '130d04b80a4196857e47b254ebfbb53f', 'command' => 'subscription.rebill', 'data' => array('item_id' => 3, 'rebill_amount' => 25.35, 'description' => 'This is dinke testing manual rebill') ); $response = $curl->send_post_data($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
Referenced Files
None
Subscribers
None
- Last Author
- boris
- Last Edited
- Mar 11 2015, 13:32