PHPackages                             dgoring/php-pwinty - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. dgoring/php-pwinty

ActiveLibrary[API Development](/categories/api)

dgoring/php-pwinty
==================

PHP API wrapper for Pwinty.com

3.2.1(8y ago)12541CC-BY-3.0PHPPHP &gt;=5.6.0

Since Nov 12Pushed 8y ago2 watchersCompare

[ Source](https://github.com/dgoring/php-pwinty)[ Packagist](https://packagist.org/packages/dgoring/php-pwinty)[ RSS](/packages/dgoring-php-pwinty/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (11)Used By (0)

PHP Pwinty v3.0
===============

[](#php-pwinty-v30)

A PHP implementation of the Pwinty HTTP API v2.3

Installation
------------

[](#installation)

### Composer

[](#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
-------------

[](#example-usage)

Catalogue

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

```

Countries

```
$countries = $pwinty->countries();

```

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

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

//creates a new order
$order = $pwinty->orders()->create(array(
    'name'                   => 'Chuck Norris',
    'email'                  => 'chuck@norris.com',
    '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'                  => 'chuck@norris.com',
    '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();

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 55.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~127 days

Recently: every ~0 days

Total

9

Last Release

3231d ago

Major Versions

2.1.1 → 3.02017-08-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/1bda7110ca4e85af9cd576aba4b761b7764a5ed324282982ecf344df7f8deee5?d=identicon)[dgoring](/maintainers/dgoring)

---

Top Contributors

[![atwright147](https://avatars.githubusercontent.com/u/986665?v=4)](https://github.com/atwright147 "atwright147 (19 commits)")[![dgoring](https://avatars.githubusercontent.com/u/12200194?v=4)](https://github.com/dgoring "dgoring (11 commits)")[![hudster](https://avatars.githubusercontent.com/u/1851802?v=4)](https://github.com/hudster "hudster (3 commits)")[![ollybowman](https://avatars.githubusercontent.com/u/1855219?v=4)](https://github.com/ollybowman "ollybowman (1 commits)")

---

Tags

apipwintypwinty.com

### Embed Badge

![Health badge](/badges/dgoring-php-pwinty/health.svg)

```
[![Health](https://phpackages.com/badges/dgoring-php-pwinty/health.svg)](https://phpackages.com/packages/dgoring-php-pwinty)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.5k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
