Page MenuHomeDatingVIP

subscription.rebill
Updated 3,354 Days AgoPublic

Version 1 of 4: You are viewing an older version of this document, as it appeared on Mar 11 2015, 13:32.

subscription.rebill

Description

Manually execute rebill

Input Parameters
NameTypeRequiredDescription
item_idintyesItem ID
rebill_amountfloatyesRebill amount
descriptionstringyesDescription
Return
NameTypeDescription
resultarrayArray 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
Last Author
boris
Last Edited
Mar 11 2015, 13:32

Event Timeline

boris moved this document from Unknown Object (Phriction Wiki Document).Mar 11 2015, 13:32
boris changed the visibility from "Public (No Login Required)" to "All Users".
boris changed the visibility from "All Users" to "Public (No Login Required)".
boris shifted this object from the Restricted Space space to the S6 Everyone space.Aug 8 2018, 08:26