PHPackages                             londry/trustoceanssl-composer-library - 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. londry/trustoceanssl-composer-library

ActiveLibrary[API Development](/categories/api)

londry/trustoceanssl-composer-library
=====================================

Composer Library for TrustOcean SSL Reseller API in PHP

v1.0.1(6y ago)091MITPHP

Since Jun 26Pushed 6y agoCompare

[ Source](https://github.com/londry/TrustOcean-Library-Composer)[ Packagist](https://packagist.org/packages/londry/trustoceanssl-composer-library)[ RSS](/packages/londry-trustoceanssl-composer-library/feed)WikiDiscussions master Synced yesterday

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

Composer Library for TrustOgitcean SSL Reseller API in PHP

Register and Submit one ticket to get Free API Access account: Feedback and Help: Please join our developer QQ Group(ID 941598653), or use submit issue on GitHub.

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Get Instance of SslOrder API](#Get_Instance_of_SslOrder_API)
3. [Create New SSL Order](#Create_New_SSL_Order)
4. [Check And Get Issued Certificate](#Check_And_Get_Issued_Certificate)

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

[](#installation)

Use your composer:

```
composer require londry/trustoceanssl-composer-library
```

Get\_Instance\_of\_SslOrder\_API
--------------------------------

[](#get_instance_of_sslorder_api)

Before you try access api, you need add your local/server public ip address to the whitelist in your TrustOcean API Account.

```
$newSslOrder = new SslOrder('api@example.com','ApiToken-replace-this-to-your-own');
```

Create\_New\_SSL\_Order
-----------------------

[](#create_new_ssl_order)

Example for apply one TrustOcean Encryption365 SSL certificate. Every time, you can also use this same logic to renew your current ssl certificate. "RENEW SSL" means you need verify your domains again and get new SSL certificate and must install it on your web server.

```
$newSslOrder->setCertificateType(CertificateType::TrustOceanEncryption365Ssl);
$newSslOrder->setCertificatePeriod(CertificatePeriod::ThreeMonths);
$newSslOrder->setUniqueId('someUniqueStringHere');
$newSslOrder->setDomains(['example1.com','example2.com','example3.com','www.example3.com']);
$newSslOrder->setCsrCode(new Csr($request->get('-----BEGIN CERTIFICATE REQUEST----- MIIDADCCAegCAQAwgboxCzAJBgNVBAYTAkNOMRAwDgYDVQQIDAdTaGFhbnhpMQ0w CwYDVQQHDAR4aWFuMScwJQYDVQQKDB5UcnVzdE9jZWFuIENvcnBvcmF0aW9uIExp bWl0ZWQxJzAlBgNVBAsMHlRydXN0T2NlYW4gQ29ycG9yYXRpb24gTGltaXRlZDEV MBMGA1UEAwwMZXhhbXBsZTEuY29tMSEwHwYJKoZIhvcNAQkBFhJkZXYtYXBpQHFp YW9rci5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDgqiV7NBxX 0J+DEqiez/mo+ZIEYZjbY3HbD1BqoV6tl85K0Me9vwodSVl1jCNzI8aH/QkFRhai CCcdkbTmuIG9rlXP9YP9MDMI8LS1z18WPy+FLNojxOjwBM6HV9tLHqAxWm9GLi9c 9JBHKNwlehLu9Zp9TjnSyrR0fBKqinS0kWRk3kYjl6Afj4qhfGV5lWtqapffoLr/ sdbp+pAhGEKw/9hU5OlX46+DORLr19qznoaez3KswejfNhlCIp6Cm5YiVoQEPvlu rioe9BJXjQC5MF8brt7IuM0PClerUDwwZ3EAz2xR8JJvQVppu2CRdtKoVPpCr2hf zC6GEBiTb+LPAgMBAAGgADANBgkqhkiG9w0BAQUFAAOCAQEAIClbOKNVB/f4Gqm9 xZ5ky/PBoGps5yfp8Ezw8IitjiX7SJFtNCXrXK7g1X6pfs6EMf2RyL1PPlJbO4+9 dEiG0faitbJ5+314WMBDIylmhSK2AILncqZvefQjrSmRNEr7Dy4JlpTM9qawJsYq /Qx1kGgss6M6CoYzg75eHueOKRv88nGzmr6/m7lIHxK5Ihrr5AtGj83OyFvucfB6 DPv+1XZP7+EpiehoyWzoA3UzLBpfSppVtnYo4oBBujF8DrBBPsaauPt59uBN1B3h 2GB+Ce3NHpAFI/x730dTj1Cdpy/xV8Ew9yBQki2Ojhzw5Ehl6yoXOnFMj0Ja0Lme nMVDKQ== -----END CERTIFICATE REQUEST-----')));
$newSslOrder->setDcvMethod(['dns','http','https','admin@example3.com']);
$newSslOrder->setContactEmail('yourName@example.com');
# Call CA
$newSsl = $newSslOrder->callInit(NULL)->callCreate();
# Get Domain Validation Information and Order ID
$dcvInfo = $newSsl->getDcvInfo();
$orderId = $newSsl->getOrderId();
```

Check\_And\_Get\_Issued\_Certificate
------------------------------------

[](#check_and_get_issued_certificate)

Reload ssl order from TrustOcean, you can easy to manage or get new certificate status.

```
$sslOrder = $newSslOrder->callInit($orderId);
$sslOrderStatus = $sslOrder->getOrderStatus();
if($sslOrderStatus === "issued_active"){
    $certificate_content = $sslOrder->getCertCode(); # will be PEM content
    $ca_certificate_content = $sslOrder->getCaCode(); # will be PEM content
}
```

Available\_Methods\_In\_This\_Lirary
------------------------------------

[](#available_methods_in_this_lirary)

This library can be used to develop PHP application/scripts that automatically apply ssl and automatically renew certificates on your web server. For non-automatic application/scripts use, you may also need the following API methods to more easily manage the order validation process and the life cycle of your ssl certificates.

```
callReissue();
callChangeDcvMethod($domainName, $newMethod);
callRemoveDomainName($unverifiedDomainName);
callRetryDcvProcess();
callResendDcvEmails();
callGetDcvDetails();
callRevokeCertificate($revocationReason);
callCancelAndRevokeCertificate();
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

2511d ago

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/londry-trustoceanssl-composer-library/health.svg)

```
[![Health](https://phpackages.com/badges/londry-trustoceanssl-composer-library/health.svg)](https://phpackages.com/packages/londry-trustoceanssl-composer-library)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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