PHP code example of fozzyhosting / leaderssl-api-client

1. Go to this page and download the library: Download fozzyhosting/leaderssl-api-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fozzyhosting / leaderssl-api-client example snippets




use Fozzy\LeaderSSL\Api\Clients;

//Login to leader ssl
$client = Clients::make('login', 'password');

    //Get all products
    /**
    * @params bool $ssl, float $price
     */
   $client->products()->list();

    /**
     * Create preorder
     *
     * @param array $query
     */
    $client->orders()->prerorder();

    /**
    * Get preorders list
    */
    $client->orders()->getPreorders();

    /**
    * Get preorder By Id
    *
    * @params int $preorderId
    */
    $client->orders()->getPreorderById('preorderId');

    /**
    * Get preorder Issue By Id
    *
    * @params int $preorderId
    */
    $client->orders()->getPreorderIssue('preorderId');


   /**
   * Create new Cert
   *
   * @param array $query
   */
   $client->orders()->new($query);

    /**
     * Get dcv emails
     *
     * @param string $domain
     */
     $client->dcv()->emails('domain');

     /**
     * Get dcv issues Status
     *
     * @param int $certificateId
     */
    $client->dcv()->status('certificateId');

    /**
     * Change DCV method and resend validation email.
     *
     * @param int $certificateId
     * @param string $dcvMethod
    */
    $client->dcv()->change('certificateId', 'dcvMethod');

    /**
     * Resend validation email
     *
     * @param int $certificateId
    */
    $client->dcv()->reSend('certificateId');

    /**
     * Get all ssl certificate
    */
    $client->certificates()->list();

    /**
    * Download Certificate by id
    *
    * @params int $certificationId
    */
    $client->certificates()->download('certificationId');

    /**
     * Get Certificate status by id
     *
     * @param int $certificateId
    */
    $client->certificates()->status('certificationId');