PHPackages                             vendasta/sales-orders - 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. vendasta/sales-orders

ActiveLibrary[API Development](/categories/api)

vendasta/sales-orders
=====================

PHP library for Vendasta's SalesOrders service

1.4.0(4y ago)01271[1 issues](https://github.com/vendasta/sales-orders-php-sdk/issues)PHP

Since Jul 23Pushed 3y ago28 watchersCompare

[ Source](https://github.com/vendasta/sales-orders-php-sdk)[ Packagist](https://packagist.org/packages/vendasta/sales-orders)[ RSS](/packages/vendasta-sales-orders/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (6)Versions (10)Used By (0)

sales-orders
============

[](#sales-orders)

Description
-----------

[](#description)

This is Vendasta's official PHP SDK for API integration of sales-orders.

Requirements
------------

[](#requirements)

- PHP 5.5 and above or PHP 7.0 and above
- [PECL](https://pecl.php.net/) (may be used to install the required PHP extensions)
- [Composer](https://getcomposer.org/)
- [PHP gmp extension](http://php.net/manual/en/book.gmp.php)
- OPTIONAL (but recommended): [PHP grpc extension](https://cloud.google.com/php/grpc)

Installation
------------

[](#installation)

Install the requirements from above, then:

```
composer require vendasta/sales-orders
```

Authentication
--------------

[](#authentication)

To authenticate your SDK calls, you must provision a service account from within the Vendasta platform.

You must put this file on your server, and set an environment variable to it's path:

```
export VENDASTA_APPLICATION_CREDENTIALS=
```

Client Initialization
---------------------

[](#client-initialization)

It is highly recommended that you use a singleton client instance. Each client initilization will open it's own connection, therefore using a singleton results in reusing a connection, saving time and resources.

Set an environment variable:

```
export ENVIRONMENT=
```

To instantiate the client:

```
$environment = getenv("ENVIRONMENT");
if ($environment == null) {
    $environment = "DEMO";
}
$client = new Vendasta\SalesOrders\V1\SalesOrdersClient($environment);
```

Notice that the environment will be set to DEMO if it is not specified.

Creating and activate an order
------------------------------

[](#creating-and-activate-an-order)

Creating and activating an order on a business will purchase the appropriate products, included are helper functions which will allow for G Suite and GoDaddy provisioning.

```
// Create the request
$req = new CreateAndActivateOrderRequest();

// Create the line items
$gSuite = SalesOrdersUtils::buildLineItem('MP-6XDHVMQ84K4THNNP2Z7W2GC28VLHRC4Q');
$goDaddy = SalesOrdersUtils::buildLineItem('MP-NNTJMBF6HPXR5XXC2JKCFWKJ64VZLBFQ');
$lineItems = array($gSuite, $goDaddy);

// Create the custom field
$gSuiteCustomField = SalesOrdersUtils::buildGSuiteCustomField("MP-6XDHVMQ84K4THNNP2Z7W2GC28VLHRC4Q", 'testdomain123.com', 'adminusername', 'First', 'Last', 'example@email.com');
$goDaddyCustomField = SalesOrdersUtils::buildGoDaddyCustomFields("MP-NNTJMBF6HPXR5XXC2JKCFWKJ64VZLBFQ", "testdomain123.com", "example@email.com", "First", "Last", "3065555555", "example@email.com", "First", "Last");
$customFields = array($gSuiteCustomField, $goDaddyCustomField);

// Create the order
$order = SalesOrdersUtils::buildOrder("ABC", "AG-123", $lineItems, $customFields);
$req->setOrder($order);

// Call CreateAndActivateOrder
$resp = $client->CreateAndActivateOrder($req);
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~47 days

Recently: every ~72 days

Total

8

Last Release

1784d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1498d6f30e570d34309cfb7c848cb3b80d0eca6bd8e28af9d5db3f4196b300bb?d=identicon)[vendasta](/maintainers/vendasta)

---

Top Contributors

[![ParkerReese](https://avatars.githubusercontent.com/u/28064536?v=4)](https://github.com/ParkerReese "ParkerReese (5 commits)")[![kamundson-va](https://avatars.githubusercontent.com/u/15634999?v=4)](https://github.com/kamundson-va "kamundson-va (3 commits)")[![avadan1](https://avatars.githubusercontent.com/u/83599192?v=4)](https://github.com/avadan1 "avadan1 (1 commits)")[![francoisp-houzz](https://avatars.githubusercontent.com/u/44957708?v=4)](https://github.com/francoisp-houzz "francoisp-houzz (1 commits)")[![gabrielsond](https://avatars.githubusercontent.com/u/228783?v=4)](https://github.com/gabrielsond "gabrielsond (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vendasta-sales-orders/health.svg)

```
[![Health](https://phpackages.com/badges/vendasta-sales-orders/health.svg)](https://phpackages.com/packages/vendasta-sales-orders)
```

###  Alternatives

[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)[google/grpc-gcp

gRPC GCP library for channel management

18497.8M3](/packages/google-grpc-gcp)[googleads/google-ads-php

Google Ads API client for PHP

3497.6M9](/packages/googleads-google-ads-php)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[agence104/livekit-server-sdk

Server-side SDK for LiveKit.

79189.9k1](/packages/agence104-livekit-server-sdk)

PHPackages © 2026

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