承接 printfection/printfection-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

printfection/printfection-php

Composer 安装命令:

composer require printfection/printfection-php

包简介

Printfection PHP Library

README 文档

README

You can sign up for a Printfection account at http://printfection.com.

Requirements

PHP 5.2 and later.

Composer

You can install the bindings via Composer. Add this to your composer.json:

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

Then install via:

composer.phar install

To use the bindings, either user Composer's autoload:

require_once('vendor/autoload.php');

Or manually:

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

Manual Installation

Obtain the latest version of the Printfection PHP bindings with:

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

To use the bindings, add the following to your PHP script:

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

Getting Started

Simple usage looks like:

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.

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.

统计信息

  • 总下载量: 4.49k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 8
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-20