PHP 5.3 Library for Chargify
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

PHP 5.3 Library for the Chargify API

This is a PHP library for the Chargify API []


This is actually a fork of a fork..

The master is: []it hasn't been updated in a while, and the maintainer hasn't merged the pull requests from maskim. These pull requests are crucial for me, so I forked

I had a PoC working, and then decided to integrate that into a new app we're developing for our customers, using the Lithium framework.

All hell broke lose. I had to refactor quite a bit of the code to work with Namespaces and for it to work cleanly with Lithium.

How to use with Lithium

  1. Just drop the code base in $project_root/libraries/_
  2. Add the following to your app/config/bootstrap/libraries.php
         array('bootstrap' => 'lib/Chargify.php')
  1. In your controller add: use chargify;

Adding to your existing Lithium project

Assuming your working directory is already a git repo, you can add this repository to it as a submodule and keep it up to date, without having to manually check all the time.

bash> cd current_lithium_project
bash> git submodule add libraries/chargify
bash> git commit 
bash> git push 

On a fresh clone you just need to do

bash> git submodule init
bash> git submodule update

What it currently does

I'll try and keep this up to date with what all it can do, as more functionality/bugs are fixed.

  • Create a subscription in Chargify
  • Throw an error from Chargify if something is broken (tested with API specific errors)