PHP code example of firelike / share-a-sale-api-client

1. Go to this page and download the library: Download firelike/share-a-sale-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/ */

    

firelike / share-a-sale-api-client example snippets


return array(
    'modules' => array(
        'Firelike\ShareASale'
    )
);


return [
    'shareasale_service' => [
        'service_url' => 'https://shareasale.com',
        'service_version' => '2.1',
        'affiliate_id' => '<affiliate-id>',
        'token' => '<token>',
        'secret_key' => '<secret-key>',
    ]
];

        use Firelike\ShareASale\Service\ShareASaleService;
        
        $service = new ShareASaleService();
        
        $options = [
            'dateStart' => '6/22/2016',
        ];
        
        $records = $service->activity($options);
        
        var_dump($records);
        

php public/index.php shareasale activity -v