Skip to content
PHP library for using ready2order POS api
Branch: master
Clone or download
Christopher Fuchs
Christopher Fuchs Add json-data $data to ready2orderErrorException as property $data
* added test for it
Latest commit 9a67a55 Jun 1, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.env.example init commit Dec 8, 2015
.gitignore init commit Dec 8, 2015
LICENSE
README.md
composer.json
phpunit.xml init commit Dec 8, 2015

README.md

ready2order PHP API

ready2order PHP API v1 is a PHP-wrapper for simply using ready2order API api.ready2order.com

Official website: www.ready2order.com

Documentation:

Please contact developer@ready2order.com to get your secret master token!

Installation

You can install ready2order-php-api-v1 with composer

composer require duxthefux/ready2order-php-api-v1

You will then need to:

  • run composer install to get these dependencies added to your vendor directory
  • add the autoloader to your application with this line: require("vendor/autoload.php")

Alternatively you can just download the ready2orderAPI.php file and include it manually:

include('./ready2orderAPI.php');

Examples

Get client data

use \ready2order\ready2orderAPI;

$ready2orderAPI = new ready2orderAPI('user-token');
print_r($ready2orderAPI->get('company'));

Insert new productgroup with one product

use \ready2order\ready2orderAPI;

$ready2order = new ready2orderAPI(getenv('R2O_USER_TOKEN'));

// INSERT PRODUCTGROUP
$productGroup = $ready2order->put('productgroups',array(
    "productgroup_name" => "PHPUnit Testproductgroup"
));
$this->assertArrayHasKey("productgroup_name",$productGroup);


// INSERT PRODUCT
$product = $ready2order->put('products',array(
        "product_name" => "Cupcake",
        "product_price" => 5.2,
        "product_vat" => 20,
        "productgroup" => array(
            "productgroup_id" => $productGroup["productgroup_id"]
        )
));

Thanks to Drew McLellan's drewm/mailchimp-api

You can’t perform that action at this time.