s1mple/infusionsoft-php-sdk

A s1mpler Infusionsoft SDK for PHP with Laravel 4.2 support.

v1.3 2015-04-16 22:51 UTC

This package is not auto-updated.

Last update: 2024-04-13 15:22:57 UTC


README

Publish your config

php artisan config:publish s1mple/infusionsoft-php-sdk

Originally forked readme:

Novak Solutions created the Infusionsoft PHP SDK to make it easier to develop for the Infusionsoft platform. The SDK utilizes the official Infusionsoft API, but works around some of its known gotchas.

Why use the Infusionsoft PHP SDK?

  • No dependencies. If your server has PHP and cURL, then you are good to go!
  • Code completion. We've added all the necessary PHPDoc comments so code completion will work in popular editors, like Eclipse and PhpStorm.
  • Automatically retries. Automatically retries failed API calls when it is safe to do so (i.e., updates and deletes).
  • Automatically handles XML-RPC. Your requests and responses are automatically encoded and decoded.
  • Automatically picks the right method. Saving records is easier. The SDK will automatically pick whether to do an insert or an update based on whether you are working with a new or existing record.
  • Future safe! The SDK will keep working, even if Infusionsoft removes a field in the future.

Fully Supported

The Infusionsoft PHP SDK is fully supported. If you find a bug or are having problems, submit an issue and we'll fix it.

We also appreciate community contributions. To contribute: fork the SDK repo, make your changes, and submit a pull request.

Installation

We keep the master branch production ready. To install, simply clone the SDK into a convenient folder. For example:

git clone git@github.com:novaksolutions/infusionsoft-php-sdk.git

You'll also need to copy Infusionsoft/config.sample.php to Infusionsoft/config.php. Edit this file and add your app name and API key.

Usage

To help you get started, we've created a screencast that will walk you through using the SDK to create a contact in your Infusionsoft app. You can find the video on YouTube: Using the Novak Solutions SDK with the Infusionsoft API.

You can also find a bunch of real-world code samples in our GitHub wiki on the Examples page.

Your project will need to include Infusionsoft/infusionsoft.php, a bootstrapper that automatically loads any classes that are needed. For example:

<?php

require_once('Infusionsoft/infusionsoft.php');

See example.php for a very basic usage example. Additional examples can be found in the Infusionsoft/examples/ folder.

WordPress

If you'd like to use the SDK inside of WordPress or with a WordPress plugin, please use the Infusionsoft SDK plugin. It is listed in the WordPress.org plugin directory so you can easily install it to any WordPress blog. We regularly update this plugin whenever the SDK is updated so you'll always get the latest bug fixes and new features.

Using the Infusionsoft SDK plugin will allow your plugin or custom code to work alongside other plugins that use the Infusionsoft PHP SDK.

License

The Infusionsoft PHP SDK is licensed under the MIT License. It is simple and easy to understand and it places almost no restrictions on what you can do with the SDK.

You are free to use the Infusionsoft PHP SDK in any other project (even commercial projects) as long as the copyright header is left intact.

Details of this license are included in the MIT-LICENSE.txt file, and must be included in all copies of the SDK.