vleks/bol-plaza-sdk

A PHP client SDK for the Bol.com Plaza API

1.1.1 2018-03-02 00:00 UTC

This package is not auto-updated.

Last update: 2024-11-10 04:01:54 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock

Installation

It's recommended that you use Composer to install the SDK.

composer require vleks/bol-plaza-sdk

This will install the Bol.com Plaza SDK.
PHP 5.6 or newer is required.

Usage

Create an index.php file with the following contents:

<?php
use Vleks\BolPlazaSDK\Client;
use Vleks\BolPlazaSDK\ClientException;

require 'vendor/autoload.php';

$publicKey  = '-- YOUR PUBLIC KEY --';
$privateKey = '-- YOUR PRIVATE KEY --';

$bolPlazaClient = new Client($publicKey, $privateKey);
$bolPlazaClient->setTestMode(true);

try {
    $orders = $bolPlazaClient->getOrders();

    var_dump($orders);
} catch (ClientException $clientException) {
    echo 'An error occurred: ' . $clientException->getMessage();
}

See the contents of the examples directory for more information.

Coverage

Not every Bol.com Plaza API endpoint is covered, check out the table for more details

Tests

To execute the test suite, you'll need PHPUnit.

$ phpunit

License

The Bol.com Plaza SDK for PHP is licensed under the MIT licence.
See the license file for more information.