PHPackages                             deamwork/trustoceanphp - 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. deamwork/trustoceanphp

ActiveLibrary[API Development](/categories/api)

deamwork/trustoceanphp
======================

PHP composer package for TrustOcean API call.

v0.1.3(7y ago)210MITPHPPHP &gt;=7.1

Since Nov 30Pushed 7y ago2 watchersCompare

[ Source](https://github.com/deamwork/TrustOceanPHP)[ Packagist](https://packagist.org/packages/deamwork/trustoceanphp)[ RSS](/packages/deamwork-trustoceanphp/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

TrustOceanPHP
=============

[](#trustoceanphp)

Composer package implementation for [TrustOcean](https://www.trustocean.com/) API.

Raw document provided by TrustOcean can be found in [here](https://api.trustocean.com/SSL-Certificate-API/), as well as their [product definition](https://api.trustocean.com/).

Product list will update once TrustOcean updated it first.

Feel free to fork and open pull request to this package. [Contributes](#contributing) are welcome.

Install
-------

[](#install)

```
composer require deamwork/trustoceanphp
```

Usage
-----

[](#usage)

Make a json config file.

```
vi config.json
```

### Config example

[](#config-example)

`level` can be `partner` or `developer`, will uses different API base uri and product definitions.

You can always set your own base API uri, fill it to `api_base`.

Don't forget to fill your TrustOcean username and password. It won't store and it only send to TrustOcean API. Details can be found in [security](#Security) section.

```
{
  "account": {
    "level": "developer",
    "username": "",
    "password": ""
  },
  "trustocean": {
    "api_base": null
  }
}
```

then, reference `use TrustOcean\Core\Actions as TOAPI` in your workflow.

Flow
----

[](#flow)

### Create new order

[](#create-new-order)

```
$flow = new TOAPI('/path/to/your/config.json');
$order = $flow->createOrder('TrustOcean Encryption365 SSL', 'quarterly', 3);
$order_id = $order['order_id'];
```

### Add more SANs

[](#add-more-sans)

```
$flow->addSANs($order_id, 3);
```

### Upload CSR

[](#upload-csr)

```
$flow->uploadCSR($order_id, "CSR TEXT GOES HERE");
```

### Set domain(s)

[](#set-domains)

```
$flow->addDomains($order_id, [
    'a.domain.tld', 'b.domain.tld', 'c.domain.tld',
    'd.domain.tld', 'e.domain.tld', 'f.domain.tld',
]);
```

### Remove domain(s)

[](#remove-domains)

```
$flow->removeDomain($order_id, [
    'd.domain.tld', 'e.domain.tld', 'f.domain.tld',
]);
```

### Get order detail(s)

[](#get-order-details)

```
$flow->getOrderDetails($order_id);
```

### Change verification method

[](#change-verification-method)

```
$flow->changeDCVMethod($order_id, [
    'a.domain.tld' => 'admin@domain.tld',
    'b.domain.tld' => 'CSR_CNAME_HASH',
    'c.domain.tld' => 'HTTP_CSR_HASH',
]);
```

### Call CA to verify your domain

[](#call-ca-to-verify-your-domain)

```
$flow->reDoDCVCheck($order_id);
$flow->resendDCVEmail($order_id);
```

... or ...

```
$flow->resendDCVEmailReDoDCVCheck($order_id);
```

### After verification, get your certs

[](#after-verification-get-your-certs)

```
$cert = $flow->getCertDetails($order_id);
print_r($cert['cert_code'], true); // get your certificate
print_r($cert['ca_code'], true);   // get CA certificate
```

### Wants reissue?

[](#wants-reissue)

```
$flow->setCertReissue($order_id);
```

Then redo the flow.

Testing
-------

[](#testing)

right in the todo list.

Contributing
------------

[](#contributing)

See [CONTRIBUTING](CONTRIBUTING.md) for more information.

Security
--------

[](#security)

This library only talks to the TrustOcean API, it will not store nor send your any information to any third party.

**In fact? This library won't store anything**

If you discover any security related issues, feel free to open a new issue and I will mark it as "Security" ASAP.

License
-------

[](#license)

This project is open-sourced under MIT license.

This demand is [required by TrustOcean](https://www.v2ex.com/t/512510), which to be honest, I prefer to choose BSD-3...

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~13 days

Total

3

Last Release

2697d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95db1400d425eb35aa881701202877c2f9fcb8fb638a25c345ed1a8bd4862846?d=identicon)[deamwork](/maintainers/deamwork)

---

Top Contributors

[![deamwork](https://avatars.githubusercontent.com/u/7680724?v=4)](https://github.com/deamwork "deamwork (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/deamwork-trustoceanphp/health.svg)

```
[![Health](https://phpackages.com/badges/deamwork-trustoceanphp/health.svg)](https://phpackages.com/packages/deamwork-trustoceanphp)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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