PHPackages                             heyday/silverstripe-vend - 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. [API Development](/categories/api)
4. /
5. heyday/silverstripe-vend

ActiveSilverstripe-vendormodule[API Development](/categories/api)

heyday/silverstripe-vend
========================

Provides Vend API integration for SilverStripe

v1.0.0(10y ago)32.0k↓84%3BSD-3-ClausePHPCI failing

Since Aug 21Pushed 11mo ago21 watchersCompare

[ Source](https://github.com/WPP-Public/akqa-nz-silverstripe-vend)[ Packagist](https://packagist.org/packages/heyday/silverstripe-vend)[ Docs](http://github.com/heyday/silverstripe-vend)[ RSS](/packages/heyday-silverstripe-vend/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Silverstripe Vend API integration
=================================

[](#silverstripe-vend-api-integration)

This module is just a wrapper around the [VendAPI package](https://github.com/brucealdridge/VendAPI) by @brucealdridge for Silverstripe.

This brings implementation for OAuth2 with token management.

Requires
--------

[](#requires)

- Silverstripe 4+
- The [vendapi/vendapi](https://github.com/brucealdridge/VendAPI) package

Install
-------

[](#install)

`composer require heyday/silverstripe-vend`

\##Setup

First you need to sign up for a Vend developer account and create an app:

When you have done so, set your details in a yml config file under `VendAPI`.

eg:

`mysite/_config/vend.yml`:

```
VendAPI\VendAPI:
    clientID: g6ohGHJgJHKtuyfUTYfjVjhGhfTUYfTU
    clientSecret: iyGFktyFKUYlguKHkjHUHUiGHKuHGKj
    redirectURI: admin/vend/authorise
```

Also map the route you have setup as a redirectURI in your Vend app to the `Heyday\Vend\SilverStripe\AuthoriseController`. This controller handles the data returned by the Vend API when you first authorise the app to connect to your store.

eg if I have setup `http://mysite.com/admin/vend/authorise` as my RedirectURI on my Vend app:

`mysite/_config/routing.yml` :

```
---
Name: vendroutes
After: "framework/routes#coreroutes"
---
Director:
    rules:
        "admin/vend/authorise": 'Heyday\Vend\SilverStripe\AuthoriseController'
---
```

After a `dev/build` and a `flush` you should have a new Menu called `Vend Admin`where the next steps of the setup are done.

You (or the owner of the shop) needd to fill in the shop name, after which a link will appear. When the link is selected you'll be presented with a request for the app to access your shop. Once it is authorised, the first token is stored in the database along with the refresh token and the cycle starts.

Every time the connection is instantiated, a check is run to see if the token has expired. A new one is issued if required. It does the same for the `refresh_token`.

Implementation
--------------

[](#implementation)

To use you just need to inject the `Heyday\Vend\Connection` where you want to use it and follow the docs of the [VendAPI package](https://github.com/brucealdridge/VendAPI) for the other methods.

eg:

### Injection config

[](#injection-config)

```
SilverStripe\Core\Injector\Injector:
    Your\Namespace\SomePageController:
        properties:
            VendConnection: '%$Heyday\Vend\Connection'
```

### Implementation in SomePageController

[](#implementation-in-somepagecontroller)

```
    protected $vendConnection;

    public function setVendConnection($vendConnection)
    {
        $this->vendConnection = $vendConnection;
    }

    public function VendTest()
    {
        $products = $this->vendConnection->getProducts();
    }
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3960d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/de4d8d61f202a03e88c3ed30cce3bfedbc6f56a16e3f3b25546c61aadc51bca2?d=identicon)[heyday](/maintainers/heyday)

---

Top Contributors

[![wilr](https://avatars.githubusercontent.com/u/101629?v=4)](https://github.com/wilr "wilr (9 commits)")[![bendubuisson](https://avatars.githubusercontent.com/u/3079189?v=4)](https://github.com/bendubuisson "bendubuisson (2 commits)")[![b-rhodes](https://avatars.githubusercontent.com/u/25066797?v=4)](https://github.com/b-rhodes "b-rhodes (1 commits)")

---

Tags

silverstripevendVendAPI

### Embed Badge

![Health badge](/badges/heyday-silverstripe-vend/health.svg)

```
[![Health](https://phpackages.com/badges/heyday-silverstripe-vend/health.svg)](https://phpackages.com/packages/heyday-silverstripe-vend)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
