Download the PHP package dgoring/php-pwinty without Composer

On this page you can find all versions of the php package dgoring/php-pwinty. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-pwinty

PHP Pwinty v3.0

A PHP implementation of the Pwinty HTTP API v2.3

Installation

Composer

Add the following to the require section of your composer.json file:

"dgoring/php-pwinty": "^3.0"

Declare a new instance of php-pwinty

$config = array(
    'api'        => 'sandbox',
    'merchantId' => 'xxxxxxxxxxxxxxxxx',
    'apiKey'     => 'xxxxxxxxxxxxxxxxx'
);
$pwinty = new Pwinty\Connnection($config);

Example Usage

Catalogue

$catalogue = $pwinty->catalogue(
    "GB",               //country code
    "Pro"               //quality
);

Countries

$countries = $pwinty->countries();

Orders //gets all orders $orders = $pwinty->orders()->get();

//gets one order
$order = $pwinty->orders()->find( 123 );

//creates a new order
$order = $pwinty->orders()->create(array(
    'name'                   => 'Chuck Norris',
    'email'                  => '[email protected]',
    'address_1'              => '123 Some Road',
    'address_2'              => 'Some place',
    'town'                   => 'Some town',
    'state'                  => 'Some state',
    'postalOrZipCode'        => '12345',
    'countryCode'            => 'GB',
    'destinationCountryCode' => 'GB',
    'useTrackedShipping'     => true,
    'payment'                => 'InvoiceMe',
    'qualityLevel'           => 'Pro'
));

//edit an order
$order = $pwinty->orders()->find( 123 );

$order->name = 'Bob';

$order = $pwinty->assign(array(
    'name'                   => 'Chuck Norris',
    'email'                  => '[email protected]',
    'address_1'              => '123 Some Road',
    'address_2'              => 'Some place',
    'town'                   => 'Some town',
    'state'                  => 'Some state',
    'postalOrZipCode'        => '12345',
));

$order->save();

//change order status
$order = $pwinty->orders()->find( 123 );

$pwinty->submit(
    'Cancelled'  //status
);

Photos

//gets information about photos for an order
$order = $pwinty->orders()->find( 123 );

$photos = $order->photos()->get();

//gets information about a single photo
$order = $pwinty->orders()->find( 123 );

$photo = $order->photos()->find( 123 );

//adds a photo
$order = $pwinty->orders()->find( 123 );

$photo = $order->photos()->create(array(
    'type'         => 'fridge_magnet',
    'url'          => 'http://example.com/photo.jpg',
    'file'         => './path/to/file,
    'copies'       => 1,
    'sizing'       => 'ShrinkToFit',
    'price'        => 200,
    'priceToUser'  => 240,
    'attributes'   => array(),
));

//delete a photo
$order = $pwinty->orders()->find( 123 );

$photo = $order->photos()->find( 123 );

$photo->destroy();

Issues

//gets information about issues for an order
$order = $pwinty->orders()->find( 123 );

$issues = $order->issues()->get();

//gets information about a single issue
$order = $pwinty->orders()->find( 123 );

$issue = $order->issues()->find( 123 );

//adds a issue
$order = $pwinty->orders()->find( 123 );

$issue = $order->issues()->create(array(
    'issue'          => 'WrongFrameColour',
    'issueDetail'    => 'It wasn\'t pink!',
    'action'         => 'Reprint',
    'actionDetail'   => 'Needs to be PINK!',
    'affectedImages' => '123,673,123',
));

//edit a issue
$issue->assign(array(
   'comment' => 'Still not Pink',
));

$issue->save();

//delete a issue
$order = $pwinty->orders()->find( 123 );

$issue = $order->issues()->find( 123 );

$issue->destroy();

All versions of php-pwinty with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dgoring/php-pwinty contains the following files

Loading the files please wait ....