PHP code example of earlhickey / pg-selligent

1. Go to this page and download the library: Download earlhickey/pg-selligent 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/ */

    

earlhickey / pg-selligent example snippets


    
    return array(
        'modules' => array(
            // ...
            'PgSelligent',
        ),
        // ...
    );
    

    //  create recipient
    $recipient = new \stdClass();
    $recipient->firstname = 'John';
    $recipient->lastname = 'Doe';
    $recipient->gender = '';
    $recipient->dateOfBirth = '';
    $recipient->email = '[email protected]';

    // Selligent email marketing opt-in
    $subscribe = $this->selligent()->subscribe($recipient);
    

    //  create recipient
    $recipient = new \stdClass();
    $recipient->email = '[email protected]';

    // Selligent email marketing opt-out
    $unsubscribe = $this->selligent()->unsubscribe($recipient);
    
bash
    $ php composer.phar update