承接 tradeprint/tradeprint-php-sdk 相关项目开发

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

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

tradeprint/tradeprint-php-sdk

最新稳定版本:1.0.7

Composer 安装命令:

composer require tradeprint/tradeprint-php-sdk

包简介

Tradeprint PHP Library

README 文档

README

CircleCI

Introduction

Tradeprint PHP SDK allows you to easily add your print on demand functionality to your app or website within minutes! Print Postcards, Business Cards, Posters, Stickers on a roll, T-Shirts, etc. Our Tradeprint PHP SDK industry standardised documentation and instructions are easy to follow and would take a software engineer no longer than a few days to complete the full integration.

Our Sandbox print API environment allows you to interact with the API endpoints through the Tradeprint PHP SDK.

As the API is created by our in-house team, we provide support to ensure it is set up and running smoothly. Once up and running, we don’t anticipate a need for further maintenance from our side. However, we do expect some work to maintain your product catalogue. This work includes adding, removing and editing products and can completed manually by your team, or parts can be automated.

Requirements

PHP >= 5.60

You will also require credentials for the Tradeprint API, if you do not already have these then please visit https://www.tradeprint.co.uk/tradeprint-api

Installation

Via composer

composer require tradeprint/tradeprint-php-sdk

Manually (For WordPress, Magento etc...)

  1. Download the SDK
  2. Include it in your project directory
  3. Import it as below
require_once('path-to-tradeprint-sdk/init.php');

Usage

try {
    $tradeprint = new Tradeprint\TradeprintSDK('YOUR_TP_USERNAME', 'YOUR_TP_PASSWORD', 'sandbox');
    $orderService = $tradeprint->getOrderService();

    $result = $orderService->getOrder('YOUR_ORDER_REFERENCE');

    $order = $result->toArray();
    echo 'Got order => '.print_r($order, true);

} catch (Tradeprint\TpAuthorizationException $e) {
    echo 'Invalid username or password';
} catch (Tradeprint\TPException $e) {
    echo 'Error getting order ' . $e->getMessage() . PHP_EOL;
    print_r($e->getDetails());
}   

Discover more with our detailed examples

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-23