2017 © Pedro Peláez
 

library chargify-php

Chargify payment processor API for PHP 5.3+

image

splashmedia/chargify-php

Chargify payment processor API for PHP 5.3+

  • Saturday, August 10, 2013
  • by dcousineau
  • Repository
  • 1 Watchers
  • 8 Stars
  • 5,381 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 2 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Chargify PHP Wrapper

This library is a simple wrapper for the Chargify payment platform. Documentation for the Chargify API can be found at http://docs.chargify.com/., (*1)

Installation

Installation is easiest with Composer. Just add the following to your requirements section:, (*2)

{
    "require": {
        "splashmedia/chargify-php": "dev-master"
    }
}

Alternatively you can autoload the library yourself as it complies with PSR-0 namespacing., (*3)

Usage

The client is relatively straightforward to use. First you must initialize the connection:, (*4)

<?php
$client = new \Splash\Chargify\Client(APIKEY, DOMAIN, SITESHAREDKEY);

Afterwards you may make calls to API endpoints as per the official chargify documentation:, (*5)

<?php
$data = array(
    'subscription' => array(
        'customer_attributes' => array(
            //...
        ),
        'payment_profile_attributes' => array(
            //...
        ),
    ),
);

/** @var $subscription \Splash\Chargify\Resource\Subscription **/
$subscription = $client->api('subscriptions', $data, 'POST');

The API will automatically hydrate Chargify API responses into the domain objects located in lib/Splash/Chargify/Resource/. You can optionally pass a 4th parameter into the api() method to disable hydration if you would prefer to work with the raw response array., (*6)

Memcached

Use memcache by calling Client::setMemcached() with an instance of the class Memcached. At this time, individual products and a complete list of products are cached., (*7)

The Versions

10/08 2013

dev-master

9999999-dev https://github.com/splashmedia/chargify-php

Chargify payment processor API for PHP 5.3+

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • ext-curl *

 

by Daniel Cousineau
by John Syrinek

payment chargify credit card