Page MenuHomeDatingVIP

subscription.rebill
Updated 3,314 Days AgoPublic

Version 2 of 4: You are viewing an older version of this document, as it appeared on Apr 20 2015, 16:57.

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

$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'	=> 'subscription.rebill',
	'data'	=> array('item_id' => 1,
					'rebill_amount' => 25.35,
					'description' => 'This is dinke testing manual rebill')
);

$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);
Last Author
dinke
Last Edited
Apr 20 2015, 16:57

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