ChurnBee php API integration library. Visit official page for more information
This module has no external dependencies.
We recommend installing this package with Composer. Add the following dependencies to your projects composer.json file:
"require": {
"churnbee/php-lib": "dev-master"
}
Then, on the command line:
curl -s http://getcomposer.org/installer | php
php composer.phar install
Use the generated vendor/autoload.php
file to autoload the library classes.
Place the ChurnBee files in the include_path
as specified in your php.ini
file or place it in the same directory as your PHP scripts.
Alternatively include all files:
require_once("ChurnBee/Library/CBConf.php");
require_once("ChurnBee/Library/ChurnBeeException.php");
require_once("ChurnBee/Library/CurlUtil.php");
require_once("ChurnBee/Library/ChurnBee.php");
Full event list and their arguments can be found here
<?php
require_once 'vendor/autoload.php';
$options = array("accessToken"=>"change_me");
$cb = new ChurnBee\Library\ChurnBee($options);
// Send registration event
$cb->register("MyUserId","MyPlan");