This PHP library is meant to be used with The City (Software to enable communication and community in your church).
This library that wraps the donation endpoints for The City Admin API (api.onthecity.org) so that donations can be segmented for a campaign registry.
TheCity API docs
http://api.onthecity.org
PHP >= 5.3
- It may work with older versions but it was developed on PHP 5.3.
Clone, fork or download the package.
~> git submodule init
~> git submodule update
The submodule is thecity-admin-php API wrapper developed by johnroberts (https://github.com/johnroberts).
define('APIKEY', '*** YOUR API KEY ***');
define('USERTOKEN', '*** YOUR API TOKEN ***');
require_once 'lib/the_city_chipin.php';
$campuses = TheCityChipin::campus_options();
$funds = TheCityChipin::fund_options($campus_id);
$campus_id = '32316';
$fund_id = '10549';
$start_date = '2013-07-01';
$end_date = '2013-07-20'; // Optional
$chipin = new TheCityChipin($campus_id, $fund_id, $start_date, $end_date);
$donation_designation_groups = $chipin->donations();
// The designation_totals() function can be called after donations() function has been called.
$donation_designation_totals = $chipin->designation_totals();
If you use WordPress there is a WordPress plugin that uses this library.
https://github.com/thecity/thecity-chipin-wordpres <== NOT SET YET
John Roberts: https://github.com/johnroberts
If you want to help out fork the project and send me a pull request. You can also send me feature requests.
This plugin is released under the MIT license. Please contact weshays
(http://github.com/weshays) for any questions.