Integration Of ICTBRoadcast With WHMCS

About ICTBroadcast
ICTBroadcast is a broadcasting web based autodialer software solution.It broadcast voice sms fax and email.It is suitable for large and medium size businesses and also suitable for service provider.Service provider edition of ICTBroadcast provide multiple services for user such like scalability,load balancing,routing white labeling etc.It blast thousand of simultaneous call at a time by using Voip and PSTN lines.It is simple, reliable, poweful and provides a user-friendly web portal for effective and efficient communications management.

About WHMCS
WHMCS is a complete web based all in one billing,support and client managment solution for all online businesses.WHMCS provide cart and invoice setup for your online business website.By using WHMCS you can automate everything from account provisioning to domain management to email reminders and many more. WHMCS provide facility of multiple currencies, auto exchange rates syncing, up to 2 levels of tax rules and a fully multilingual client area.

Integration ICTBroadcast With WHMCS
The ICTBroadcast REST APIs provide an interface to allow you to access and perform an action in ICTBroadcast for external aplications. ICTBroadcast integeration with WHMCS by using REST based API's completly automate your buinsess process.ICTBroadcast APIs are defined in 3 classes API_User,API_Contact and API_Campaign we integrate in WHMCS.Mostly ICTBroadcast REST based APIs are used in WHMCS are related to account administration.

Lets we see some of the APIs functions of ICTBroadcast which we call in WHMCS.

User_Credit_Get
This function returns credit of ICTBroadcast user whose ID is provided.

Input Parameters

usr_id: ID of the user whose credit is required.

Output

Returns json encoded string containing true and success message if successful. In case of failure, it will return false with a failure message.

Sample Code

$arguments = array(
'usr_id' => 2,
);
$result = broadcast_api('User_Credit_Get', $arguments);
if($result[0] == true) {
print_r($result[1]);
} else {
$errmsg = $result[1];
print_r($errmsg);
}
?>

User_Payment_Create
This function creates a payment from a user whose id is provided. This payment amount will credited into that user's account.

Input Parameters

usr_id: ID of the user who paid the amount
value: Paid amount that will be added to user's account
type: Payment type. One of the following 4 values. cash, cheque, online, other.
description: Any textual description associated with this payment.

paid_date: Optional, Date payment made on. example 2014-06-05, if missing current date will be used

Output

Returns json encoded string containing true and success message if successful. In case of any failure, it will return false with a failure message.

Sample Code

$arguments = array(
'usr_id' => 5,
'value' => 500,
'type' => 'cash',
'description' => 'Paid cash amount');
$result = broadcast_api('User_Payment_Create', $arguments);
if($result[0] == true) {
print_r($result[1]);
} else {
$errmsg = $result[1];
print_r($errmsg);
}
?>

User_Payment_List
This function list of all the payments made by a user.

Input Parameters

usr_id: Optional. id of the user.

Output

Returns json encoded string containing true and list of payments if successful. In case of any failure, it will return false.

Sample Code

$arguments = array('usr_id'=> $usr_id);
$result = broadcast_api('User_Payment_List', $arguments);
if($result[0] == true) {
$paymentList = $result[1];
foreach ($paymentList as $payment) {
print_r($payment);
}
} else {
$errmsg = $result[1];
print_r($errmsg);
}
?>