PHPackages                             buendon/pwinty-bundle - 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. buendon/pwinty-bundle

ActiveSymfony-bundle[API Development](/categories/api)

buendon/pwinty-bundle
=====================

A Symfony service in order to interact with the Pwinty API

03PHP

Since May 22Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Buendon/PwintyBundle)[ Packagist](https://packagist.org/packages/buendon/pwinty-bundle)[ RSS](/packages/buendon-pwinty-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Introduction
============

[](#introduction)

This Symfony Bundle propose a service to communicate with the [Pwinty](http://www.pwinty.com) API.

It uses the simple PHP implementation from [php-pwinty](https://github.com/Buendon/php-pwinty) and adds on top of it:

- An oriented-object API
- A Symfony service that can be used in a Symfony project.

**Warning:** This bundle still in construction, hence there is no official release yet.

Installation
============

[](#installation)

Update your composer.json in your Symfony project:

```
    "repositories" : [{
        "type": "vcs",
        "url": "https://github.com/Buendon/php-pwinty"
    }],
    ...
    "require": {
        ...
        "pwinty/php-pwinty" : "dev-api_2.3",
        "buendon/pwinty-bundle": "dev-master"
    },
    ...
```

Update your `AppKernel.php`

```
    // ...
    new \Buendon\PwintyBundle\BuendonPwintyBundle(),
    // ...
```

Then, run `composer update buendon/pwinty-bundle pwinty/php-pwinty`

**Note that** you need to declare a specific GitHub repository for the php-pwinty bundle.

Indeed, this one is a fork of [Pwinty/php-pwinty](https://github.com/Pwinty/php-pwinty).

A push request needs to be sent to the original one in order for it to be compatible with the 2.3 version of the Pwinty API.

This will be done when this module will be released.

Configuration
=============

[](#configuration)

Edit your `config.yml` file and add this:

```
    buendon_pwinty:
        apiType: 'sandbox'
        merchantId: 'yourPwintyMerchantId'
        apiKey: 'yourPwintyAPIKey'
```

The `apiType` can take the following values:

- sandbox
- production

This will be used to configure the [Pwinty URL](http://www.pwinty.com/ApiDocs/Overview/2_3#URLs) for the requests.

As it is stated in the Pwinty documentation, the tests and developments must be done with the sandbox `apiType`if you don't want to be billed with the submitted orders.

Usage
=====

[](#usage)

```
