Introducing litwicki/chargify-bundle

This implementation leverages an object-oriented approach to replicating all of the entities available via the API. From there, each of the Model entities are manipulated with Handlers that allow full control of the entire API layer.

As of this post, v1 is the only integrated support, but v2 (Chargify Direct) is being developed as I write this.


Follow installation instructions on the repository README



//use statements
use LitwickiBundleChargifyBundleModelCustomer;

public function showCustomersAction(Request $request)
    //check permissions and stuff here..

    $handler = $this->container->get('litwicki_chargify.handler.customers');

    //$customers is an array of customer objects
    $customers = $handler->findAll();

    //do stuff, return to twig, or return as json

public function newCustomerAction(Request $request)
    //Create the Customer object
    $customer = new Customer();
    //Load the Customer Handler service
    $handler = $this->container->get('litwicki_chargify.handler.customers');

    //Save the customer object, and repopulate with all auto generated fields
    $customer = $handler->create($customer);


Full Documentation

Full documentation can be found here: Litwicki Chargify Bundle Documentation

Categories: Random


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *