Hold Subscription
Hold a subscription.
Example
Use the $API->action('package', $package_id, 'hold',...);
method to hold a subscription.
<?php
header('Content-Type: text/plain');
require '../ChargeOverAPI.php';
require 'config.php';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
$package_id = 582;
$resp = $API->action('package', $package_id, 'hold',
array(
'holduntil_datetime' => date('Y-m-d H:i:s', strtotime('+30 days'))
));
/*
print("\n\n\n\n");
print($API->lastRequest());
print("\n\n\n\n");
print($API->lastResponse());
print("\n\n\n\n");
exit;
*/
if (!$API->isError($resp))
{
print('SUCCESS!');
}
else
{
print('Error message was: ' . $resp->code . ': ' . $resp->message . "\n");
print("\n\n\n\n");
print($API->lastRequest());
print("\n\n\n\n");
print($API->lastResponse());
print("\n\n\n\n");
}