Download the PHP package simplesquid/vend-sdk without Composer
On this page you can find all versions of the php package simplesquid/vend-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simplesquid/vend-sdk
More information about simplesquid/vend-sdk
Files in simplesquid/vend-sdk
Package vend-sdk
Short Description An unoffical PHP SDK for Vend POS
License MIT
Homepage https://github.com/simplesquid/vend-sdk
Informations about the package vend-sdk
Vend SDK (a PHP client)
An unofficial PHP SDK for the Vend POS API.
Installation
You can install this package via composer:
Setup
To setup, get the instance of the SDK and set the desired user agent and settings:
It is advisable that you use the client object as a singleton, however, there is no explicit restriction for this.
Usage
This outlines a typical sequence of instructions, but is not a complete list of all the functionality of the SDK. Please review the code for more advanced usages. It is also suggested you read the Vend API documentation.
Alternatively, you can see a working authorisation implementation in our Laravel Vend SDK package.
Authorisation
You have two options for authorisation with the Vend API, a Personal Access Token or OAuth 2.0.
Personal Access Token
When using the Personal Access Token, simply setup the Vend client like so:
OAuth 2.0
Setup the Vend client with the OAuth identifiers:
Initial authorisation procedure
Send the user to the OAuth URL generated by:
Use the domain prefix and authorisation code returned from the OAuth process:
Make sure you store the returned Token object and the domain prefix.
Subsequent setup procedure
Once you have received the initial authorisation, you may setup the Vend client using the Token object received during the authorisation process:
If a request throws a \SimpleSquid\Vend\Exceptions\TokenExpiredException
, you can refresh the token like so:
Again, make sure you store the returned Token object.
Requests
To see all the available requests, take a look at traits located in the Actions
folder. As an example, Products can be managed using the following requests:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Matthew Poulter
- Chun-Sheng, Li
- All Contributors
Package skeleton based on spatie/skeleton-php.
About us
SimpleSquid is a small web development and design company based in Cape Town, South Africa.
License
The MIT License (MIT). Please see License File for more information.
All versions of vend-sdk with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^6.3
spatie/data-transfer-object Version ~1.11.0
nesbot/carbon Version ^2.23