PHPackages                             apsconnect/connect-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. apsconnect/connect-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

apsconnect/connect-sdk
======================

APS Connect QuickStart SDK

22.0(4y ago)1513.6k↓33.3%12[2 issues](https://github.com/cloudblue/connect-php-sdk/issues)2Apache-2.0PHPPHP &gt;=5.6.0CI failing

Since Aug 30Pushed 4y ago12 watchersCompare

[ Source](https://github.com/cloudblue/connect-php-sdk)[ Packagist](https://packagist.org/packages/apsconnect/connect-sdk)[ RSS](/packages/apsconnect-connect-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (48)Used By (2)

Connect PHP SDK
===============

[](#connect-php-sdk)

[![Build Status](https://github.com/cloudblue/connect-php-sdk/workflows/Build%20Connect%20PHP%20SDK/badge.svg)](https://github.com/cloudblue/connect-php-sdk/actions) [![Latest Stable Version](https://camo.githubusercontent.com/fb27206d4de97bccd7727ee62465294d9ff640d7404bdc3707605973206213a2/68747470733a2f2f706f7365722e707567782e6f72672f617073636f6e6e6563742f636f6e6e6563742d73646b2f762f737461626c65)](https://packagist.org/packages/apsconnect/connect-sdk) [![License](https://camo.githubusercontent.com/290ca9cf684e4a4661b175f93578b5cc00eb9200edab778165eafd1a952773a3/68747470733a2f2f706f7365722e707567782e6f72672f617073636f6e6e6563742f636f6e6e6563742d73646b2f6c6963656e7365)](https://packagist.org/packages/apsconnect/connect-sdk) [![codecov](https://camo.githubusercontent.com/f70b452279b90efe4a53fe86854fd59aa132b1c818df13ed9eaa72e672d9a417/68747470733a2f2f636f6465636f762e696f2f67682f636c6f7564626c75652f636f6e6e6563742d7068702d73646b2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/cloudblue/connect-php-sdk)[![PHP Version](https://camo.githubusercontent.com/ea94dafad6d6049f4a04c695ceb1c2f3248a3784813520aa6906d636b43e1656/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f617073636f6e6e6563742f636f6e6e6563742d73646b2e7376673f7374796c653d666c6174266272616e63683d6d6173746572)](https://packagist.org/packages/apsconnect/connect-sdk) [![Quality Gate Status](https://camo.githubusercontent.com/a1c750dd29c8f4e7e6077f35adc929b5ea5883ff9533401baf9dc11cc2ff328f/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d636f6e6e65637470687073646b266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=connectphpsdk)

Getting Started
---------------

[](#getting-started)

Connect PHP SDK allows an easy and fast integration with [CloudBlue Connect](https://www.cloudblue.com/connect/) Fulfillment and Usage APIs with PHP-based integrations. This SDK enables you to automate fulfillment of orders for your products and report usage data for them.

Before using the library, please first to go through the documentation in the Connect knowledge base, which could be used as a source of information on the rest APIs used by this SDK.

Class Features
--------------

[](#class-features)

This library can be utilized in your project for the automation of the fulfillment logic as well as usage reporting. This class, once imported into your project, will enable you to:

- Establish connectivity to Connect APIs
- List all requests and apply filters like
    - Filter requests by Product
    - Filter requests by Status
    - Filter requests by Asset
    - etc.
- Process each request and obtain full details of the request
- Modify parameters of a request in order to:
    - Inquire for changes
    - Store information into the fulfillment request
- Change the status of the requests from it's initial pending state to either inquiring, failed or approved.
- Generate and upload usage files to report usage for active contracts and listings
- Process usage file status changes
- Work with Notes for requests
- Generate logs
- Collect debug logs in case of failure

Your code may use any scheduler to execute, from a simple cron to a cloud scheduler like the ones available in Azure, Google, Amazon or other cloud platforms.

Installation &amp; loading
--------------------------

[](#installation--loading)

Connect PHP SDK is available through [Packagist](https://packagist.org/packages/apsconnect/connect-sdk) (using semantic versioning), and installation via the [Composer](https://getcomposer.org) is the recommended way to install the Connect PHP SDK. Just add these lines to your `composer.json` file:

```
{
  "require": {
    "apsconnect/connect-sdk": "^18.0"
    }
}
```

or run

```
composer require apsconnect/connect-sdk --no-dev --prefer-dist --classmap-authoritative
```

Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer

A Simple Example of the fulfillment
-----------------------------------

[](#a-simple-example-of-the-fulfillment)

This example demonstrates a script that will retrieve all requests in the status pending and process them based on their type (purchase, change, cancel, suspend or resume)

```
