xolphin-php-api is a library which allows quick integration of the Xolphin REST API in PHP to automated ordering, issuance and installation of SSL Certificates.
Xolphin is the largest supplier of SSL Certificates and Digital Signatures in the Netherlands. Xolphin has a professional team providing reliable support and rapid issuance of SSL Certificates at an affordable price from industry leading brands such as Comodo, GeoTrust, GlobalSign, Thawte and Symantec.
Library can be installed via Composer
composer require xolphin/xolphin-api-php
And updated via
composer update xolphin/xolphin-api-php
<?php
require 'vendor/autoload.php';
$client = new Xolphin\Client('<username>', '<password>');
$requests = $client->request()->all();
foreach($requests as $request) {
echo $request->id . "\n";
}
$request = $client->request()->get(1234);
echo $request->id;
$products = $client->support()->products();
// request Comodo EssentialSSL certificate for 1 year
$request = $client->request()->create($products[1]->id, 1, '<csr_string>', 'EMAIL')
->setAddress("Address")
->setApproverFirstName("FirstName")
->setApproverLastName("LastName")
->setApproverPhone("+12345678901")
->setZipcode("123456")
->setCity("City")
->setCompany("Company")
->setApproverEmail('email@domain.com')
//currently available languages: en, de, fr, nl
->setLanguage('en')
->addSubjectAlternativeNames('test1.domain.com')
->addSubjectAlternativeNames('test2.domain.com')
->addSubjectAlternativeNames('test3.domain.com')
->addDcv(new \Xolphin\Requests\RequestDCV('test1.domain.com', 'EMAIL', 'email1@domain.com'))
->addDcv(new \Xolphin\Requests\RequestDCV('test2.domain.com', 'EMAIL', 'email2@domain.com'));
$client->request()->send($request);
// Reissue a current certificate
$reissue = new \Xolphin\Requests\Reissue('<csr_string>', 'EMAIL');
$reissue->setApproverEmail('email@domain.com');
$client->certificate()->reissue(<certificate_id>, $reissue);
// Renew a current certificate
$currentCertificate = $client->certificate()->get(<certificate_id>);
$renew = new \Xolphin\Requests\Renew($currentCertificate->product, <years>, '<csr_string>', 'FILE');
$renew->setApproverEmail('email@domain.com');
$client->certificate()->renew(<certificate_id>, $renew)
$result = $client->request()->sendNote(1234,'My message');
$notes = $client->request()->getNotes(1234);
foreach($notes as $note){
echo $note->messageBody . "\n";
}
//currently available languages: en, de, fr, nl
$client->request()->sendComodoSAEmail(1234, 'mail@example.com', 'en');
$certificates = $client->certificate()->all();
foreach($certificates as $certificate) {
echo $certificate->id . ' - ' . $certificate->isExpired() . "\n";
}
$certificates = $client->certificate()->all();
$cert = $client->certificate()->download($certificates[0]->id);
file_put_contents('cert.crt', $cert);
$products = $client->support()->products();
foreach($products as $product) {
echo $product->id . "\n";
}
$csr = $client->support()->decodeCSR('<your csr string>');
echo $csr->type;