module clientpad-api-php-wrapper
clientpad/clientpad-api-php-wrapper
- Monday, January 15, 2018
- by webmayak
- Repository
- 1 Watchers
- 0 Stars
- 1 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
Installation
Prefered way to use composer:
composer require "clientpad/clientpad-api-php-wrapper":"@dev"
, (*1)
Usage
$wrapper = new \clientpad\api\CPWrapper;
$wrapper->auth_name = 'heres_auth_name';
$wrapper->auth_pass = 'heres_auth_pass';
$wrapper->site_url = 'http://mysuperAABASFASdomen.clientpad.ru'; //heres your clientpad url
$response = $wrapper->createOrder("This is a body of order");
print_r($response); //response will be like "{"body":"This is a body of order", "id":7}"
//so its $response in our case is object already and we can use it like $response->body and do with it all what want