Download the PHP package ordersaga/php-sdk without Composer

On this page you can find all versions of the php package ordersaga/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-sdk

OrderSaga PHP SDK

This SDK allows you to quickly get up and running with your OrderSaga integration.

Dependencies

GuzzleHTTP, PHP 7.1+

Prerequisites

An ordersaga.com account and API Key

Installation

Create an environment variable for the API key and API version

If you have multiple keys, you can switch between them either by providing them during instantiation of the Endpoint class, or by setting it globally:

The same thing works for the API version

You can also set both the key and the version at the same time globally

Development/Sandbox

Just prepend your API key with "dev_" in order to enable sandbox mode.

Example:

Client User

Each action taken stores a historical record of what was done. To accurately tie this change to the user making it, a client_user_id is automatically added to each request. This value is pulled from $_ENV['CLIENT_USER_ID']. On each request, you should set this value to the current Guest or User's ID.

Usage

A sample of the addUser method:

Users

Users come in 3 flavors: 1) Guest: They do not officially have an account in the system, but they are treated the same. They are identified by a token to group their submissions and actions. Upon login, the guest account will be merged with the user. 2) User: They are a full-fledged user with password. 3) Employee: Essentially the same as a User, but with the ability to differentiate, you can display things like the cost of products or administration features.

Any endpoint method that accepts/requires a $user_id accepts the ID of any of these users. $guest->getId() for instance.

You can create a Guest using information they provided on your Contact Us form (or any other form), or as a totally blank anonymous Guest (like if someone adds a product to their cart)


All versions of php-sdk with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ordersaga/php-sdk contains the following files

Loading the files please wait ....