2017 © Pedro Peláez
 

library printfection-php

Printfection PHP Library

image

printfection/printfection-php

Printfection PHP Library

  • Thursday, March 23, 2017
  • by zachflower
  • Repository
  • 7 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Requirements

PHP 5.2 and later., (*1)

Composer

You can install the bindings via Composer. Add this to your composer.json:, (*2)

{
  "require": {
    "printfection/printfection-php": "1.*"
  }
}

Then install via:, (*3)

composer.phar install

To use the bindings, either user Composer's autoload:, (*4)

require_once('vendor/autoload.php');

Or manually:, (*5)

require_once('/path/to/vendor/printfection/printfection-php/lib/Printfection.php');

Manual Installation

Obtain the latest version of the Printfection PHP bindings with:, (*6)

git clone https://github.com/printfection/printfection-php

To use the bindings, add the following to your PHP script:, (*7)

require_once("/path/to/printfection-php/lib/Printfection.php");

Getting Started

Simple usage looks like:, (*8)

Printfection::setApiKey('ACCESS_TOKEN');

$order = Printfection_Order::create(array(
    'campaign_id' => 1,
    'ship_to' => array(
            'name' => 'Herman Munster',
            'address' => '1313 Mockingbird Lane',
            'address2' => '#1200',
            'city' => 'Mockingbird Heights',
            'state' => 'California',
            'zip' => '90210',
            'country' => 'US',
            'email' => 'herman@printfection.com',
            'phone' => '3034597990'
        ),
    'lineitems' => array(
            array(
                    'item_id' => 1,
                    'size_id' => 1,
                    'quantity' => 13
                )
        )
));

echo $order;

Documentation

Please see http://printfection.github.io/API-Documentation/ for up-to-date documentation., (*9)

Acknowledgements

This API client was strongly inspired by (and based on) the Stripe PHP client library. Special thanks to everyone who has worked on that project., (*10)

The Versions

23/03 2017

dev-master

9999999-dev http://printfection.com/

Printfection PHP Library

  Sources   Download

MIT

The Requires

  • php >=5.2
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

api printfection swag marketing